Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit edacade

Browse files
committed
Exit when no hash given
1 parent fadb646 commit edacade

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tracker-add.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ torrent_hash=$1
44
base_url='http://torrentz.eu'
55
pattern='announcelist_[0-9]+'
66

7+
if [ -z "$1" ] ; then
8+
echo "usage: ./tracker-add sh <hash>"
9+
exit 1
10+
fi
11+
712
announce_list=`curl -s ${base_url}/${torrent_hash} | grep -Eo "${pattern}"`
813

914
for tracker in $(curl -s ${base_url}/${announce_list})

0 commit comments

Comments
 (0)