tsvkit installer, SimpleWebPage with image support
This commit is contained in:
11
rc
11
rc
@@ -10,18 +10,27 @@ PATH=$( echo $PATH | awk -F: '{for (i=1;i<=NF;i++) { if ( !x[$i]++ ) printf("%s:
|
||||
export PATH
|
||||
|
||||
. "$TOOLSPATH"/qcd_function
|
||||
[[ -f "$TOOLSPATH"/tsv/tsvkit.sh ]] && . "$TOOLSPATH"/tsv/tsvkit.sh
|
||||
|
||||
function _self_update() {
|
||||
touch "$TOOLSPATH"/.lastupdate
|
||||
pushd "$TOOLSPATH" > /dev/null
|
||||
[[ "$1" = "-u" ]] && {
|
||||
hg pull -u https://bitbucket.org/MoonQ/tools
|
||||
_update_tsvkit
|
||||
} || {
|
||||
timeout 5 hg pull -u hg pull https://bitbucket.org/MoonQ/tools > /dev/null 2>&1
|
||||
}
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
function _update_tsvkit() {
|
||||
mkdir -p "$TOOLSPATH"/tsv/lib
|
||||
wget -qO "$TOOLSPATH"/tsv/tsvkit.sh https://bitbucket.org/anduril-dev/anduril/raw/anduril2/lang/bash/tsvkit.sh
|
||||
wget -qO "$TOOLSPATH"/tsv/lib/tsvhead https://bitbucket.org/anduril-dev/anduril/raw/anduril2/lang/bash/lib/tsvhead
|
||||
wget -qO "$TOOLSPATH"/tsv/lib/tsvtail https://bitbucket.org/anduril-dev/anduril/raw/anduril2/lang/bash/lib/tsvtail
|
||||
}
|
||||
|
||||
function _change_hg_repo() {
|
||||
[[ -w "$TOOLSPATH"/.hg ]] || return
|
||||
[[ -w "$TOOLSPATH"/.hg/hgrc ]] || return
|
||||
@@ -58,6 +67,6 @@ unset -f _change_hg_repo
|
||||
TOOLS_LASTUPDATE=$(( $( date +%s ) - $( stat -c %Y "$TOOLSPATH"/.lastupdate ) ))
|
||||
[[ "$TOOLS_LASTUPDATE" -gt 604800 ]] && _self_update
|
||||
unset TOOLS_LASTUPDATE
|
||||
unset -f _self_update
|
||||
unset -f _self_update _update_tsvkit
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user