Skip to content

Instantly share code, notes, and snippets.

@liaohuqiu
Created March 22, 2017 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liaohuqiu/92c00403c78459caf8440da8d7432c94 to your computer and use it in GitHub Desktop.
Save liaohuqiu/92c00403c78459caf8440da8d7432c94 to your computer and use it in GitHub Desktop.
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