changeset 580:5a0f3d427979

Change touch function to noop when uninstalling
author nanaya <me@myconan.net>
date Sun, 11 Oct 2015 04:11:49 +0900
parents fd416344f175
children b3c05c6be28d
files setup
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/setup	Sun Oct 11 04:08:38 2015 +0900
+++ b/setup	Sun Oct 11 04:11:49 2015 +0900
@@ -126,6 +126,9 @@
 }
 
 _touch() {
+  test "${1}" = "uninstall" && return
+  shift
+
   touch "${@}"
   _echo "Ensured existence of ${@}"
 }
@@ -201,9 +204,9 @@
     _rc "${1}" "gitconfig" ".gitconfig"
     _rc "${1}" "gitignore_global" ".gitignore_global"
     _rc "${1}" "hgrc" ".hgrc"
-    _touch "${HOME}/.hgrc.local"
+    _touch "${1}" "${HOME}/.hgrc.local"
     _rc "${1}" "hgignore_global" ".hgignore_global"
-    _touch "${HOME}/.hgignore_global.local"
+    _touch "${1}" "${HOME}/.hgignore_global.local"
     _rc "${1}" "inputrc" ".inputrc"
     _tmux "${1}"
     _rc "${1}" "vim-vividchalk" ".vim/colors/vividchalk.vim"