1
0
mirror of https://github.com/danog/learn-bash.git synced 2024-11-26 11:54:39 +01:00

Added auto-update

This commit is contained in:
Daniil Gentili 2015-05-29 18:27:59 +02:00
parent d8ee3768f7
commit 2792941989

View File

@ -5,6 +5,17 @@
# Thanks to The Linux Documentation Project and to #openshells @freenode.
# 1.0
which wget &>/dev/null
if [ "$?" = 0 ];then dl() {
wget $1 -O $2 $3
}
Q="-q"
else dl() {
curl $1 -o $2 $3
}
Q="-s"
fi
echo -n "Self-updating script..." && dl http://daniilgentili.magix.net/learn.sh $0 $Q 2>/dev/null;chmod +x $0 &>/dev/null; echo -en "\r\033[K"
clear