background update
This commit is contained in:
3
rc
3
rc
@@ -13,13 +13,14 @@ export PATH
|
||||
function _self_update() {
|
||||
touch "$TOOLSPATH"/.lastupdate
|
||||
pushd "$TOOLSPATH" > /dev/null
|
||||
timeout 5 hg pull -u > /dev/null 2>&1
|
||||
timeout 5 hg pull -u > /dev/null 2>&1 &
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
[[ "$1" = "-u" ]] && _self_update
|
||||
|
||||
# Update self weekly
|
||||
[[ -w "$TOOLSPATH" ]] || return
|
||||
[[ -t 0 ]] || return
|
||||
[[ -t 1 ]] || return
|
||||
[[ -t 2 ]] || return
|
||||
|
||||
Reference in New Issue
Block a user