This repository was archived by the owner on Mar 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Building using Make file
Amitai Burstein edited this page Jan 27, 2014
·
26 revisions
Below is an example of a shell script that allows you to build a project and install a development OpenScholar installation or even a specific git tag.
##Building
- Copy
default.install.shand name the copyinstall.sh, by executingcp default.install.sh install.shfrom the command line - Edit
install.shto replace the default settings with your own as explained in the comments of the code below - After saving
install.shwith your changes, to build OpenScholar execute the codebash install.sh - Note: The build may fail due to drush cache, so if it fails you may want to try and clear the cache before building again. Clear the cache completely by running the command
rm -rf ~/.drush/cache.
#!/bin/bash
# Modify the MySQL settings below so they will match your own.
MYSQL_USERNAME="root"
MYSQL_PASSWORD="1234"
MYSQL_HOST="localhost"
MYSQL_DB_NAME="openscholar"
# Modify the URL below to match your OpenScholar base domain URL.
BASE_DOMAIN_URL="http://localhost/openscholar"
# Modify the login details below to be the desired login details for the Administrator account.
ADMIN_USERNAME="admin"
ADMIN_PASSWORD="admin"
ADMIN_EMAIL="admin@example.com"
chmod 777 www/sites/default
rm -rf www/
mkdir www
bash scripts/build
cd www
drush si -y openscholar --account-name=$ADMIN_USERNAME account-pass=$ADMIN_PASSWORD account-mail=$ADMIN_EMAIL --db-url=mysql://$MYSQL_USERNAME:$MYSQL_PASSWORD@$MYSQL_HOST/$MYSQL_DB_NAME --uri=$BASE_DOMAIN_URL openscholar_flavor_form.os_profile_flavor=development openscholar_install_type.os_profile_type=vsite
drush vset purl_base_domain '$BASE_DOMAIN_URL'
# This command migrates dummy content and is used for development and testing. Comment out both lines if you wish to have a clean OpenScholar installation.
drush en -y os_migrate_demo
drush mi --all --user=1
# This command will do the login for you when the build script is done. It will open a new tab in your default browser and login to your project as the Administrator. Comment out this line if you do not want the login to happen automatically.
drush uli --uri=$BASE_DOMAIN_URL##Re-building Re-building OpenScholar is important and should be done whenever you wish to use a new OpenScholar release.
When you wish to re-build the profile (i.e. when there is a new release of OpenScholar), execute the code below from the command line:
bash scripts/build.sh -y