changeset 139:9ff99d9bf388

Merge.
author Edho Arief <edho@myconan.net>
date Tue, 01 Nov 2011 22:41:09 +0700
parents 7dd9ad7f977c (diff) f963d52c031a (current diff)
children 110d0ec96f7c
files
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rc/hg	Wed Nov 02 22:12:16 2011 +0700
+++ b/rc/hg	Tue Nov 01 22:41:09 2011 +0700
@@ -1,5 +1,5 @@
 [ui]
-username = Edho Prima Arief <edho@myconan.net>
+username = Edho Arief <edho@myconan.net>
 merge = vimdiff
 verbose = true
 
--- a/setup	Wed Nov 02 22:12:16 2011 +0700
+++ b/setup	Tue Nov 01 22:41:09 2011 +0700
@@ -44,17 +44,22 @@
 }
 
 _rc() {
+  if test -z "${3}" || test -z "${2}" || test -z "${1}"; then
+    _echo "Invalid command."
+    return
+  fi
   _srcfile="${rcdir}/${2}"
   _dstfile="${HOME}/${3}"
   if test ! -h "${_dstfile}"; then
     if test -f "${_dstfile}"; then
       cp "${_dstfile}" "${_dstfile}.bak"
+      _echo "${_dstfile} backed up to ${_dstfile}.bak"
     elif test -d "${_dstfile}"; then
       cp -r "${_dstfile}" "${_dstfile}.bak"
+      _echo "Directory ${_dstfile} backed up to ${_dstfile}.bak"
     fi
-    _echo "${_dstfile} backed up to ${_dstfile}.bak"
   fi
-  rm -f "${_dstfile}"
+  rm -rf "${_dstfile}"
   case "${1}" in
     install)
       ln -fs "${_srcfile}" "${_dstfile}"