diff --git a/.drone.yml b/.drone.yml index a32fbfc..183407b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -77,4 +77,4 @@ steps: pull: if-not-exists commands: - . $HOME/.bashrc - - trash || true \ No newline at end of file + - trash \ No newline at end of file diff --git a/trash.sh b/trash.sh index b4331af..e4515c8 100644 --- a/trash.sh +++ b/trash.sh @@ -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