Last active
April 6, 2016 13:43
-
-
Save yugarinn/4ab1a3b336ab38a53660d2312c18b3bd to your computer and use it in GitHub Desktop.
yodo installer
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
#!/usr/bin/env bash | |
# yodo installation script | |
cd | |
update=false | |
case "$OSTYPE" in | |
darwin*) echo 'export PATH="~/.yodo:$PATH"' >> ~/.bash_profile; source ~/.bash_profile ;; | |
linux*) echo 'export PATH="~/.yodo:$PATH"' >> ~/.bashrc; source ~/.bashrc; echo 'linux' ;; | |
esac | |
if [ -d .yodo ]; then | |
update=true | |
cp ~/.yodo/settings ~/yodo_settings_bk | |
rm -rf ~/.yodo | |
fi | |
git clone https://github.com/sergiouve/yoDo.git | |
mkdir .yodo | |
cp yoDo/. .yodo/ -R | |
chmod a+x -R .yodo | |
rm -rf ~/yoDo | |
if [ "$update" = true ]; then | |
rm ~/.yodo/settings | |
cp ~/yodo_settings_bk ~/.yodo/settings | |
rm ~/yodo_settings_bk | |
fi | |
yodo whoareyou | |
if [ "$update" = true ]; then | |
echo 'yodo was successfully updated!' | |
else | |
echo 'yodo was successfully installed!' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment