From d987b655dffd25bbda2ac4e6fd335385bbcb4f3c Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Thu, 10 Sep 2015 13:55:50 -0400 Subject: Add bin/ folder. --- bin/setup.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3