fix usage

This commit is contained in:
Kim Oliver Drechsel 2021-09-21 21:08:59 +02:00
parent 86ac4d34b1
commit b441b73b06
2 changed files with 6 additions and 3 deletions

View File

@ -77,4 +77,4 @@ steps:
pull: if-not-exists
commands:
- . $HOME/.bashrc
- trash || true
- trash

View File

@ -11,7 +11,10 @@ usage() {
local func_args=$1
local func_name="$2"
if [[ $func_args == 0 ]]; then echo -e "At least one argument required:\n$func_name FILE1 DIR2 ..."; exit 1; fi
if [[ $func_args == 0 ]];
then echo -e "At least one argument required:\n$func_name FILE1 DIR2 ..."
exit
fi
}
trash_list() {
@ -19,7 +22,7 @@ trash_list() {
}
trash_put() {
usage "$#" "$0"
usage "$#" "${FUNCNAME[0]}"
for FILE in $@; do
# Store old filepath for later restore