summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2015-06-10 01:57:35 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2015-06-10 01:57:35 -0400
commitc752b6876f5a9eb80b833696841ca66eb4e50ca0 (patch)
tree2fef0fd027e08a283cb008fcba51d2b9ea284646
parent84e37bf525c9934a70120c346e8afcf026f78950 (diff)
Change echo=>printf in setup script, which also works on OS X.
-rwxr-xr-xbin/setup.sh22
-rwxr-xr-xzshrc2
2 files changed, 12 insertions, 12 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
diff --git a/zshrc b/zshrc
index 35a8768..0fadeae 100755
--- a/zshrc
+++ b/zshrc
@@ -29,7 +29,7 @@ export WORDCHARS=''
# Dvorak
setopt DVORAK
-alias ls="ls --color"
+# alias ls="ls --color"
if which gvim >/dev/null; then
alias vi="gvim --remote"
fi