Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Commit

Permalink
quit on ctrl+c
Browse files Browse the repository at this point in the history
  • Loading branch information
phanirithvij committed Sep 6, 2019
1 parent 8224f38 commit 4a3980b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ fi
maxpad=$(echo $total | wc -m)
maxpad=$((maxpad-1))

echo "maxpad is $maxpad"

if [[ "$s" == "a" ]]
then
count=0
Expand All @@ -63,7 +61,7 @@ then
curl -L -o $name -C - "$i" -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36'
else
wget -c -q --show-progress $i -O $name --header='user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36'
fi
fi || break
done
else
j=1
Expand All @@ -80,7 +78,7 @@ else
curl -L -o $name -C - "$i" -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36'
else
wget -c -q --show-progress $i -O $name --header='user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36'
fi
fi || break
fi
j=$((j+1))
done
Expand Down

0 comments on commit 4a3980b

Please sign in to comment.