diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-09-10 13:55:50 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-09-10 13:55:50 -0400 |
commit | d987b655dffd25bbda2ac4e6fd335385bbcb4f3c (patch) | |
tree | 1981af4aecec1d97ceec3a107dd5cc259cbe07ba | |
parent | 37dcc007a5a46ee52815f4b1247cb2abba326b60 (diff) |
Add bin/ folder.
-rwxr-xr-x | bin/setup.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bin/setup.sh b/bin/setup.sh index 918c41b..217be3c 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -12,10 +12,13 @@ if [[ ! -f dotfiles/bin/setup.sh ]]; then exit 1 fi -if ! which git >/dev/null; then - printf "${red}[FAIL]${none} git not installed\n" - exit 1 -fi +required_commands=(git basename) +for command in ${required_commands[@]}; do + if ! which "${command}" >/dev/null; then + printf "${red}[FAIL]${none} ${command} not installed\n" + exit 1 + fi +done cd ~/dotfiles git submodule update --init --recursive @@ -44,6 +47,12 @@ create_symlink dotfiles/gitconfig .gitconfig create_symlink dotfiles/taskrc .taskrc create_symlink /dev/null .vimrc.local +mkdir -p bin +for binary in dotfiles/bin/*; do + binary=$(basename "${binary}") + create_symlink "../dotfiles/bin/${binary}" "bin/${binary}" +done + if [[ "${SHELL}" = *zsh* ]]; then create_symlink dotfiles/zshrc .zshrc else |