termux-tools: fix minor syntax issues in backup/restore tools

This commit is contained in:
Leonid Pliushch 2021-10-08 22:05:52 +03:00
parent dd65d4e50a
commit b7433a155f
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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