File tree Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Original file line number Diff line number Diff line change 2828fi
2929 done
3030done
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
3480ids=${1:- " $( transmission-remote " $host " ${auth: +--auth=" $auth " } --list | grep -vE ' Seeding|Stopped|Finished' | grep ' ^ ' | awk ' { print $1 }' ) " }
3581
You can’t perform that action at this time.
0 commit comments