update also reloads

This commit is contained in:
Ville Rantanen
2017-03-24 13:27:42 +02:00
parent 632dcef70f
commit dd4c35c28f

14
rc
View File

@@ -11,17 +11,19 @@ export PATH
. "$TOOLSPATH"/qcd_function
[[ -f "$TOOLSPATH"/tsv/tsvkit.sh ]] && . "$TOOLSPATH"/tsv/tsvkit.sh &>/dev/null
function _tools-reload {
# reload self
[[ -z "$TOOLSPATH" ]] && return
source "$TOOLSPATH"/rc
}
function _tools-update {
# update self
[[ -z "$TOOLSPATH" ]] && return
[[ -w "$TOOLSPATH" ]] || return
"$TOOLSPATH"/rc -u
"$TOOLSPATH"/rc -u
_tools-reload
}
function _tools-reload {
# update self
[[ -z "$TOOLSPATH" ]] && return
source "$TOOLSPATH"/rc
}
function _self_update() {
touch "$TOOLSPATH"/.lastupdate