mirror of
https://github.com/danog/learn-bash.git
synced 2024-11-30 04:19:06 +01:00
Added auto-update
This commit is contained in:
parent
d8ee3768f7
commit
2792941989
11
learn.sh
11
learn.sh
@ -5,6 +5,17 @@
|
|||||||
# Thanks to The Linux Documentation Project and to #openshells @freenode.
|
# Thanks to The Linux Documentation Project and to #openshells @freenode.
|
||||||
# 1.0
|
# 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"
|
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
|
clear
|
||||||
|
Loading…
Reference in New Issue
Block a user