Created
November 15, 2012 15:28
-
-
Save rezozero/4079183 to your computer and use it in GitHub Desktop.
BASH: Create site
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!bin/bash | |
| # Ambroise Maupate REZO ZERO | |
| echo "---------------------------------------------\n" | |
| echo "- Création d'un nouveau site sur `hostname` -\n" | |
| echo "---------------------------------------------\n" | |
| APACHE_ROOT="/var/www/" | |
| CMS_REL_DIR="../RZ-CMS" | |
| if [ -z "$1" ]; then | |
| echo "ERREUR, vous devez fournir le nom du dossier à créer."; | |
| else | |
| cd $APACHE_ROOT | |
| mkdir $1 | |
| cd $APACHE_ROOT$1 | |
| pwd | |
| # Copy unique folders | |
| cp -r $CMS_REL_DIR/rz-temp ./ | |
| cp -r $CMS_REL_DIR/rz-conf ./ | |
| cp -r $CMS_REL_DIR/templates ./ | |
| cp -r $CMS_REL_DIR/plugins ./ | |
| cp -r $CMS_REL_DIR/cache ./ | |
| cp -r $CMS_REL_DIR/fonts ./ | |
| cp -r $CMS_REL_DIR/documents ./ | |
| # Create symlinks for common files | |
| ln -s $CMS_REL_DIR/administrator.php ./ | |
| ln -s $CMS_REL_DIR/img ./ | |
| ln -s $CMS_REL_DIR/index.php ./ | |
| ln -s $CMS_REL_DIR/min ./ | |
| ln -s $CMS_REL_DIR/robots.txt ./ | |
| ln -s $CMS_REL_DIR/rz-core ./ | |
| ln -s $CMS_REL_DIR/.htaccess ./ | |
| echo "---- Create site DONE ----\n\n" | |
| echo "`ls -la`" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment