Created
March 22, 2017 03:47
-
-
Save liaohuqiu/92c00403c78459caf8440da8d7432c94 to your computer and use it in GitHub Desktop.
This file contains 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
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