termux-tools: fix minor syntax issues in backup/restore tools
This commit is contained in:
parent
dd65d4e50a
commit
b7433a155f
@ -4,7 +4,7 @@ set -e -u
|
||||
export PREFIX=@TERMUX_PREFIX@
|
||||
|
||||
msg() {
|
||||
echo "$@" >&2
|
||||
echo "$*" >&2
|
||||
}
|
||||
|
||||
show_usage() {
|
||||
@ -30,7 +30,7 @@ fi
|
||||
if [ $# -gt 1 ]; then
|
||||
shift 1
|
||||
msg
|
||||
msg "[!] Got extra arguments: $@"
|
||||
msg "[!] Got extra arguments: $*"
|
||||
show_usage
|
||||
exit 1
|
||||
fi
|
||||
@ -41,7 +41,7 @@ if [ ! -d "$PREFIX" ]; then
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
-?|-h|--help|--usage) show_usage; exit 0;;
|
||||
-\?|-h|--help|--usage) show_usage; exit 0;;
|
||||
*) BACKUP_FILE_PATH=$1;;
|
||||
esac
|
||||
|
||||
|
@ -4,7 +4,7 @@ set -e -u
|
||||
export PREFIX=@TERMUX_PREFIX@
|
||||
|
||||
msg() {
|
||||
echo "$@" >&2
|
||||
echo "$*" >&2
|
||||
}
|
||||
|
||||
show_usage() {
|
||||
@ -33,13 +33,13 @@ fi
|
||||
if [ $# -gt 1 ]; then
|
||||
shift 1
|
||||
msg
|
||||
msg "[!] Got extra arguments: $@"
|
||||
msg "[!] Got extra arguments: $*"
|
||||
show_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
-?|-h|--help|--usage) show_usage; exit 0;;
|
||||
-\?|-h|--help|--usage) show_usage; exit 0;;
|
||||
*) BACKUP_FILE_PATH=$1;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user