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
NofarGizra edited this page Nov 3, 2013
·
26 revisions
Below is an example of a shell script that allows you to build a project and install a development OpenScholar installation. Please note that this code is already a part of OpenScholar and there is no need to copy it again, it is the file default.install.sh which is located in the root of this git repository.
##Building
- Copy default.install.sh and name the copy install.sh
cp default.install.sh install.sh - 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.shfrom the command line.
#!/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