From b81ef017eb67033ad15c76c864c4207ee478221e Mon Sep 17 00:00:00 2001 From: q Date: Fri, 26 Feb 2016 21:04:44 +0200 Subject: [PATCH] more checkig for update --- qcd_function | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qcd_function b/qcd_function index ba017c3..59f38cc 100644 --- a/qcd_function +++ b/qcd_function @@ -337,10 +337,12 @@ function foldermenu_prompt { } function _tools-update { - touch "$TOOLSPATH"/.lastupdate - pushd "$TOOLSPATH" > /dev/null - hg pull -u 2>&1 - popd > /dev/null + [[ -w "$TOOLSPATH" ]] || return + touch "$TOOLSPATH"/.lastupdate + [[ -w "$TOOLSPATH"/.lastupdate ]] || return + pushd "$TOOLSPATH" > /dev/null + hg pull -u 2>&1 + popd > /dev/null } function qbg {