From 82e1dbabf647beb06b6c0ebf5b22aeb208a04bc3 Mon Sep 17 00:00:00 2001 From: LAN-TW Date: Tue, 13 Dec 2011 23:20:54 +0800 Subject: =?UTF-8?q?bash=5Finclude:=20=E4=BF=AE=E6=AD=A3=E5=9B=9E=E6=94=B6?= =?UTF-8?q?=E7=AD=92=E5=9C=A8=20GNU/Linux=20=E4=B8=8A=E7=84=A1=E6=B3=95?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash_include | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bash_include') 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" -- cgit v1.2.3