timeout of 10s for wget
This commit is contained in:
parent
f145a22274
commit
62b16547b4
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ mkdir -p $CWD/els
|
||||||
elfileget_or_update() {
|
elfileget_or_update() {
|
||||||
URL=$1
|
URL=$1
|
||||||
FILENAME=$(echo "$URL" | grep -o -e "[/=][A-Za-z0-9+-]*\.el" | tr -d '=' | tr -d '/')
|
FILENAME=$(echo "$URL" | grep -o -e "[/=][A-Za-z0-9+-]*\.el" | tr -d '=' | tr -d '/')
|
||||||
wget -c "$URL" -O "$FILENAME.new"
|
wget -T 10 -c "$URL" -O "$FILENAME.new"
|
||||||
[ "$(wc -c $FILENAME.new)" > 0 ] && mv "$FILENAME.new" "$FILENAME"
|
[ "$(wc -c $FILENAME.new)" > 0 ] && mv "$FILENAME.new" "$FILENAME"
|
||||||
[ -e "$FILENAME.new" ] && rm "$FILENAME.new"
|
[ -e "$FILENAME.new" ] && rm "$FILENAME.new"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue