fix usage
This commit is contained in:
parent
86ac4d34b1
commit
b441b73b06
@ -77,4 +77,4 @@ steps:
|
|||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
- . $HOME/.bashrc
|
- . $HOME/.bashrc
|
||||||
- trash || true
|
- trash
|
7
trash.sh
7
trash.sh
@ -11,7 +11,10 @@ usage() {
|
|||||||
local func_args=$1
|
local func_args=$1
|
||||||
local func_name="$2"
|
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() {
|
trash_list() {
|
||||||
@ -19,7 +22,7 @@ trash_list() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
trash_put() {
|
trash_put() {
|
||||||
usage "$#" "$0"
|
usage "$#" "${FUNCNAME[0]}"
|
||||||
|
|
||||||
for FILE in $@; do
|
for FILE in $@; do
|
||||||
# Store old filepath for later restore
|
# Store old filepath for later restore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user