summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2015-06-10 08:59:12 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2015-06-10 08:59:12 -0400
commit02b28801145229efd498a329d5074fe6f81459bb (patch)
tree8102b41fde1a9e915bcdf39ac7a2c80c8d10a080 /bin
parent6b95114944052699b0591491457d77cd0cc83b81 (diff)
parentc752b6876f5a9eb80b833696841ca66eb4e50ca0 (diff)
Merge branch 'master' of /storage/projects/dotfiles
Diffstat (limited to 'bin')
-rwxr-xr-xbin/setup.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/setup.sh b/bin/setup.sh
index afc42e2..6b9015e 100755
--- a/bin/setup.sh
+++ b/bin/setup.sh
@@ -8,12 +8,12 @@ none='\e[0m'
cd
# Check that things are in their right places.
if [[ ! -f dotfiles/bin/setup.sh ]]; then
- echo -e "${red}[FAIL]${none} expected to find myself"
+ printf "${red}[FAIL]${none} expected to find myself\n"
exit 1
fi
if ! which git >/dev/null; then
- echo -e "${red}[FAIL]${none} git not installed"
+ printf "${red}[FAIL]${none} git not installed\n"
exit 1
fi
@@ -26,17 +26,17 @@ cd
# Does nothing and prints an error message if $2 exists and is not a symlink.
create_symlink() {
if [[ -e "$2" && ! -h "$2" ]]; then
- echo -e "${orange}[SKIPPED]${none} '$2' exists and is not a symlink."
+ printf "${orange}[SKIPPED]${none} '$2' exists and is not a symlink.\n"
return
else
if ln -sf "$1" "$2"; then
- echo -e "${green}[OK]${none} '$2' → '$1'"
+ printf "${green}[OK]${none} '$2' → '$1'\n"
else
- echo -e "${red}[WARNING]${none} could not create '$2'"
+ printf "${red}[WARNING]${none} could not create '$2'\n"
fi
fi
if ! diff "$2" "$(dirname $2)/$1"; then
- echo -e "${red}[WARNING]${none} diffs in $2"
+ printf "${red}[WARNING]${none} diffs in $2\n"
fi
}
@@ -46,19 +46,19 @@ create_symlink /dev/null .vimrc.local
if [[ "${SHELL}" = *zsh* ]]; then
create_symlink dotfiles/zshrc .zshrc
else
- echo -e "${orange}[SKIPPED]${none} shell is not zsh :-(."
+ printf "${orange}[SKIPPED]${none} shell is not zsh :-(.\n"
fi
if which i3 >/dev/null; then
mkdir -p .i3
create_symlink ../dotfiles/i3/config .i3/config
else
- echo -e "${orange}[SKIPPED]${none} i3 not installed."
+ printf "${orange}[SKIPPED]${none} i3 not installed.\n"
fi
create_symlink dotfiles/vimrc .vimrc
if [[ -e .vim/bundle/Vundle.vim ]]; then
- echo -e "${orange}[SKIPPED]${none} Vundle.vim already installed"
+ printf "${orange}[SKIPPED]${none} Vundle.vim already installed\n"
else
success=1
mkdir -p .vim/bundle
@@ -66,8 +66,8 @@ else
|| success=0
vim +PluginInstall +qall || success=0
if [[ "$success" == "1" ]]; then
- echo -e "${green}[OK]${none} installed vim plugins"
+ printf "${green}[OK]${none} installed vim plugins\n"
else
- echo -e "${red}[WARNING]${none} failed to install vim plugins"
+ printf "${red}[WARNING]${none} failed to install vim plugins\n"
fi
fi