Skip to content

Commit c87608c

Browse files
committed
cant remember
1 parent 0a33869 commit c87608c

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

manual-tracker-add.sh

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,54 @@ else
2828
fi
2929
done
3030
done
31+
version="1.0"
3132
}
32-
33+
if [ $# -eq 0 ]; then
34+
help
35+
fi
36+
help(){
37+
echo "$0 v.$version"
38+
echo
39+
echo "Usage: trash <files...>"
40+
echo " trash [options]"
41+
echo " trash [options] <file>"
42+
echo
43+
echo " -h Show this help screen"
44+
echo " -V Show current version"
45+
echo " "
46+
echo " -e Empty trash can"
47+
echo " -p Purge specific files from trash can"
48+
echo " -l List files in trash can"
49+
echo " -r Restore specific file from trash can"
50+
echo " -R Restore ALL files from trash can"
51+
echo
52+
echo "To report bugs visit https://github.com/tonymorello/trash/issues"
53+
echo
54+
exit 1
55+
}
56+
while getopts hVvelp:r:Rc: opt;
57+
do
58+
case $opt in
59+
"h") help
60+
;;
61+
"V") echo $version
62+
;;
63+
"v") verbose="-v"
64+
;;
65+
"e") empty
66+
exit 1
67+
;;
68+
"p") purgelist+=($OPTARG)
69+
;;
70+
"l") list
71+
exit 1
72+
;;
73+
"r") restorelist+=($OPTARG)
74+
;;
75+
"R") restoreallfiles
76+
;;
77+
esac
78+
done
3379
# Get list of active torrents
3480
ids=${1:-"$(transmission-remote "$host" ${auth:+--auth="$auth"} --list | grep -vE 'Seeding|Stopped|Finished' | grep '^ ' | awk '{ print $1 }')"}
3581

0 commit comments

Comments
 (0)