Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function exe_cmd() {
echo $1
eval $1
}
function ensure_dir()
{
if [ ! -d $1 ]; then
exe_cmd "mkdir -p $1"
fi
}
function intall_basic_tools() {
if [ ! -d ~/git/work-anywhere/ ]; then
exe_cmd "cd ~/git"
exe_cmd "git clone https://github.com/liaohuqiu/work-anywhere.git"
exe_cmd "cd ~/git/work-anywhere/"
exe_cmd "sh tools/update-bash-profile.sh"
exe_cmd "sh tools/update-git-config.sh"
fi
if [ ! -d ~/git/vim_anywhere/ ]; then
exe_cmd "cd ~/git"
exe_cmd "git clone https://github.com/liaohuqiu/vim_anywhere.git"
exe_cmd "cd ~/git/vim_anywhere/"
exe_cmd "sh setup.sh"
fi
}
ensure_dir ~/git
intall_basic_tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.