From d6968df872e48c0c3b3fb865d1d3ea3a20df93ba Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 17 Aug 2014 01:23:08 +0900 Subject: [PATCH] setup.sh: fix some bugs --- setup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 9d947f1..b1ec15e 100755 --- a/setup.sh +++ b/setup.sh @@ -9,6 +9,7 @@ __setups="shrc_common gitconf tmux scripts darwin dirs selfupdate windirs dotfil __homelocal="$HOME/.local" __homevar="$HOME/.var" __dotfiles_dir_default="$HOME/10sr_dotfiles" +_current_date=`date` # TODO: how to give args to command? @@ -167,7 +168,7 @@ setup_shrc_common(){ #!/bin/sh # $__shrc_common -# Automatically generated by $0 +# Automatically generated by $0 at $_current_date ismsys=$ismsys iscygwin=$iscygwin @@ -277,9 +278,9 @@ setup_tmux(){ ;; esac - _date=`date` cat <<__EOC__ >"$tmux_conf_local" + cat <<__EOC__ >"$tmux_conf_local" # $tmux_conf_local -# Automatically generated by $0 at $_date +# Automatically generated by $0 at $_current_date set -g status-right "${USER}@$(hostname) | #(tmux -V) " @@ -299,6 +300,7 @@ _fetch_script(){ url="$1" name="$2" dst="$HOME/.local/bin/$name" + test -f "$dst" && return 0 command -v "$name" >/dev/null && return 0 if _download "$url" "$dst" then