Created
May 11, 2015 22:25
-
-
Save doostinharrell/d40669a891ca8fb8b0d5 to your computer and use it in GitHub Desktop.
setup.sh - The Wired Mouse development script
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/sh | |
# | |
# Read Me: To run this command type: sh setup.sh sitename cms | |
# | |
# Author: Dustin Harrell (The Wired Mouse) | |
# Version: 2.0.dev | |
# Description: Running this script will configure a new custom website for development within our development environment | |
# | |
if [ -e $1 ]; | |
then | |
echo "ERROR: please supply site name ie: thewiredmouse --- sh setup.sh thewiredmouse com drupal" | |
exit 1 | |
fi | |
if [ -e $2 ]; | |
then | |
echo "ERROR: please supply a cms to install ie: drupal, wordpress --- sh setup.sh thewiredmouse com drupal" | |
exit 1 | |
fi | |
SCRIPTDIR="/home/drush-docs/twm" | |
VHDIR="/home/$1" | |
THEMEDIR="/home/$1/public_html/sites/all/themes/$1" | |
sudo echo "Configuring virtual host" | |
#virtualmin create-domain --domain $1.twm --unix --dir --pass zxsw21 --web --dns --mysql | |
sudo echo "Changing into virtual host directory" | |
cd $VHDIR | |
PWD=$(pwd) | |
if [ $2 = "drupal" ]; | |
then | |
rm -Rf $VHDIR/public_html | |
mkdir $VHDIR/public_html | |
cp $SCRIPTDIR/drupal.sh $VHDIR/public_html/ | |
cd $VHDIR/public_html/ | |
sh drupal.sh $1 | |
cd $THEMEDIR | |
git clone https://github.com/doostinharrell/omega-gulp.git | |
rm -f package.json | |
mv -f omega-gulp/dev ./ | |
mv omega-gulp/gulpfile.js ./ | |
mv omega-gulp/package.json ./ | |
mv omega-gulp/EXAMPLE.info ./ | |
mv omega-gulp/boxsizing.htc ./ | |
mv omega-gulp/node-install.sh ./ | |
sh node-install.sh | |
rm -Rf omega-gulp | |
rm -f node-install.sh | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment