Skip to content

Instantly share code, notes, and snippets.

@yugarinn
Last active April 6, 2016 13:43
Show Gist options
  • Save yugarinn/4ab1a3b336ab38a53660d2312c18b3bd to your computer and use it in GitHub Desktop.
Save yugarinn/4ab1a3b336ab38a53660d2312c18b3bd to your computer and use it in GitHub Desktop.
yodo installer
#!/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