aboutsummaryrefslogtreecommitdiffstats
path: root/bash_include
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2013-11-29 23:22:33 +0800
committerLAN-TW <lantw44@gmail.com>2013-11-29 23:22:33 +0800
commita7fb4577e3200609b19b52ccc7da300c613f127c (patch)
tree32ed57d53883295025b6ba80f9eded5bb58bf2af /bash_include
parent51de08f30510bb91286f7594ce12c564a849c84c (diff)
downloadconfigfile-a7fb4577e3200609b19b52ccc7da300c613f127c.tar
configfile-a7fb4577e3200609b19b52ccc7da300c613f127c.tar.gz
configfile-a7fb4577e3200609b19b52ccc7da300c613f127c.tar.bz2
configfile-a7fb4577e3200609b19b52ccc7da300c613f127c.tar.lz
configfile-a7fb4577e3200609b19b52ccc7da300c613f127c.tar.xz
configfile-a7fb4577e3200609b19b52ccc7da300c613f127c.tar.zst
configfile-a7fb4577e3200609b19b52ccc7da300c613f127c.zip
bash_include: 更新設定檔若未修改則不確認、用 $USER 代替 whoamibash_include-20131129
Diffstat (limited to 'bash_include')
-rw-r--r--bash_include5
1 files changed, 4 insertions, 1 deletions
diff --git a/bash_include b/bash_include
index 3c2337d..94be254 100644
--- a/bash_include
+++ b/bash_include
@@ -96,7 +96,7 @@ historycountfile="$HOME/.bash_history.count"
historybackupfile="$HOME/.bash_history.bak"
realpath_program="readlink -f"
-bgrunfiledir="$HOME/tmp/bgrun-`whoami`"
+bgrunfiledir="$HOME/tmp/bgrun-$USER"
trashdir="$HOME/trash"
@@ -1084,6 +1084,9 @@ function fetch_and_merge ()
while true
do
echo ""
+ cmp "${local_file}" "${local_file}.new" &> /dev/null && \
+ echo "Downloaded file is the same as installed one." && \
+ break
printf "Configuration files update tool: "
printf "Updating \e[1;35m${local_file}\e[m\n"
echo ""