diff --git a/update.sh b/update.sh index 1a32edc..acf3e49 100755 --- a/update.sh +++ b/update.sh @@ -7,10 +7,13 @@ scriptdir=$(dirname $(realpath $0)) update_file() { local A="$1" local B="$2" + local notify="${3:-}" if [ ! -f "$B" ]; then - echo "File $B does not exist, skipping update." - printf 'Run: mkdir -p %q && cp %q %q\n' "$(dirname "$B")" "$A" "$B" + if [ "$notify" = "notify" ]; then + echo "File $B does not exist, skipping update." + printf 'Run: mkdir -p %q && cp %q %q\n' "$(dirname "$B")" "$A" "$B" + fi return fi @@ -49,13 +52,13 @@ update_file $scriptdir/files/.nanorc ~/.nanorc update_file $scriptdir/files/.vimrc ~/.vimrc update_file $scriptdir/files/.tmux.conf ~/.tmux.conf update_file $scriptdir/files/gpg.conf ~/.gnupg/gpg.conf -update_file $scriptdir/files/zsh/00-init.zsh ~/.oh-my-zsh/custom/00-init.zsh -update_file $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/10-theme.zsh -update_file $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/20-function.zsh -update_file $scriptdir/files/zsh/50-env.zsh ~/.oh-my-zsh/custom/50-env.zsh -update_file $scriptdir/files/zsh/51-alias.zsh ~/.oh-my-zsh/custom/51-alias.zsh -update_file $scriptdir/files/zsh/80-proxy.zsh ~/.oh-my-zsh/custom/80-proxy.zsh -update_file $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/90-other.zsh +update_file $scriptdir/files/zsh/00-init.zsh ~/.oh-my-zsh/custom/00-init.zsh notify +update_file $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/10-theme.zsh notify +update_file $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/20-function.zsh notify +update_file $scriptdir/files/zsh/50-env.zsh ~/.oh-my-zsh/custom/50-env.zsh notify +update_file $scriptdir/files/zsh/51-alias.zsh ~/.oh-my-zsh/custom/51-alias.zsh notify +update_file $scriptdir/files/zsh/80-proxy.zsh ~/.oh-my-zsh/custom/80-proxy.zsh notify +update_file $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/90-other.zsh notify update_file $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/ys-simple.zsh-theme update_file $scriptdir/files/zsh/iterm2_shell_integration.zsh ~/.iterm2_shell_integration.zsh update_authorized_keys