aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2011-12-13 23:20:54 +0800
committerLAN-TW <lantw44@gmail.com>2011-12-13 23:20:54 +0800
commit82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3 (patch)
tree209bcba704c65c57cdab67dd2c886370d46e469d
parentd170ffa7ad95ce87a40ba87a8c1d55a5af05ccc7 (diff)
downloadconfigfile-82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3.tar
configfile-82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3.tar.gz
configfile-82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3.tar.bz2
configfile-82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3.tar.lz
configfile-82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3.tar.xz
configfile-82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3.tar.zst
configfile-82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3.zip
bash_include: 修正回收筒在 GNU/Linux 上無法使用的問題bash_include-20111213
-rw-r--r--bash_include6
1 files changed, 5 insertions, 1 deletions
diff --git a/bash_include b/bash_include
index f4fa2ee..8dadcaa 100644
--- a/bash_include
+++ b/bash_include
@@ -23,6 +23,8 @@ HISTSIZE=1000000
HISTFILESIZE=1000000
HISTCONTROL=ignoredups:ignorespace
+REALPATH_PROGRAM="realpath"
+
@@ -320,7 +322,7 @@ function trash_mv ()
split_arguments "$@"
while [ "${arglist[$i]}" ]
do
- original_path="`realpath "${arglist[$i]}"`"
+ original_path="`$REALPATH_PROGRAM "${arglist[$i]}"`"
current_time=`date "+%Y%m%d-%H%M%S"`
better_time=`date "+%Y-%m-%d %H:%M:%S"`
dirname="`basename "${arglist[$i]}" | sed -e 's/-/_/g' -e 's/ /_/g'`"
@@ -533,6 +535,8 @@ check_important_files
startcolor
prehistory_backup
+[ "`uname`" = "Linux" ] && REALPATH_PROGRAM="readlink -f"
+
umask 0022
echo "Setting key binding"