Created
June 9, 2012 18:45
-
-
Save possibilities/2902168 to your computer and use it in GitHub Desktop.
A dependency installer for possibilities/meteor-client-sessions
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 | |
# | |
# Until Meteor with something better, | |
# This script installs the required dependencies into meteor | |
# Written by @orefalo (Olivier Refalo) | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done | |
CLIENT_SESSIONS="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
read -p "Where is your meteor installation? (typically: /usr/local/meteor): " -e installpath | |
[[ -z $installpath ]] && installpath="/usr/local/meteor" | |
# Validate the path | |
echo -n "Validating $installpath..." | |
[[ ! -f "$installpath/LICENSE.txt" ]] && echo "Invalid meteor path" && exit 1 | |
[[ ! -d "$installpath/packages" ]] && echo "Invalid meteor path" && exit 1 | |
echo "Good!" | |
installpath="$installpath/packages" | |
# Prepare the checkout | |
[[ -d /tmp/dependencies ]] && rm -rf /tmp/dependencies | |
mkdir -p /tmp/dependencies | |
cd /tmp/dependencies | |
# checkout | |
git clone https://github.com/possibilities/meteor-filters.git | |
git clone https://github.com/possibilities/meteor-simple-secure.git | |
read -p "Do you plan on running the demo? (y/n)? " -n 1 -r | |
echo | |
[[ $REPLY = [yY]* ]] && { | |
git clone https://github.com/possibilities/meteor-model-base.git | |
git clone https://github.com/possibilities/meteor-party.git | |
git clone https://github.com/possibilities/meteor-dev-trix.git | |
git clone https://github.com/possibilities/meteor-demostrap.git | |
git clone https://github.com/possibilities/meteor-environment-hooks.git | |
git clone https://github.com/possibilities/meteor-simple-demo.git | |
git clone https://github.com/possibilities/meteor-validation.git | |
git clone https://github.com/possibilities/meteor-forms.git | |
} | |
# install | |
read -p "Please confirm installation (y/n)? " -n 1 -r | |
echo | |
[[ $REPLY = [nN]* ]] && exit 0 | |
for i in `ls` | |
do | |
mv -f "$i"/src/* "$installpath" | |
done | |
cp -R $CLIENT_SESSIONS/src/client-sessions "$installpath" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment