diff --git a/motds/motd.sh.in b/motds/motd.sh.in index 1a76844..bf5a6ca 100644 --- a/motds/motd.sh.in +++ b/motds/motd.sh.in @@ -6,7 +6,7 @@ source "@TERMUX_PREFIX@/bin/termux-setup-package-manager" || exit 1 terminal_width="$(stty size | cut -d" " -f2)" if [[ "$terminal_width" =~ ^[0-9]+$ ]] && [ "$terminal_width" -gt 60 ]; then - motd=" + motd=" \e[47m \e[0m \e[1mWelcome to Termux!\e[0m \e[47m \e[0m \e[0;37m\e[47m .\e[0m \e[47m \e[0m \e[47m \e[0m \e[47m \e[0m \e[1mDocs:\e[0m \e[4mhttps://termux.dev/docs\e[0m @@ -16,11 +16,11 @@ if [[ "$terminal_width" =~ ^[0-9]+$ ]] && [ "$terminal_width" -gt 60 ]; then \e[47m \e[0m \e[1mTermux version:\e[0m ${TERMUX_VERSION-Unknown} " - motd_indent=" " + motd_indent=" " else - motd=" + motd=" \e[1mWelcome to Termux!\e[0m \e[1mDocs:\e[0m \e[4mhttps://termux.dev/docs\e[0m @@ -30,7 +30,7 @@ else \e[1mTermux version:\e[0m ${TERMUX_VERSION-Unknown} " - motd_indent="" + motd_indent="" fi motd+=" @@ -43,7 +43,7 @@ ${motd_indent}\e[1mUpgrade:\e[0m pkg upgrade if [ "$TERMUX_APP_PACKAGE_MANAGER" = "apt" ]; then - motd+=" + motd+=" ${motd_indent}\e[1mSubscribing to additional repos:\e[0m ${motd_indent}\e[1mRoot:\e[0m pkg install root-repo ${motd_indent}\e[1mX11:\e[0m pkg install x11-repo diff --git a/scripts/chsh.in b/scripts/chsh.in index 32702b0..409b4cc 100644 --- a/scripts/chsh.in +++ b/scripts/chsh.in @@ -11,11 +11,7 @@ show_usage() { echo "usage: chsh [-s shell]" echo "Change the login shell." echo - if [ "${1:-}" = "login" ]; then - echo "The shell value must be one of following and cannot be 'login':" - else - echo "The shell value must be one of following:" - fi + echo "The shell value must be one of following and cannot be 'login':" echo " - Empty value to restore default shell." echo " - Absolute path to shell starting with a '/'." echo " - Relative path to shell not starting with a '/' relative to '@TERMUX_PREFIX@/bin'." @@ -28,10 +24,6 @@ set_shell() { exit 0 fi - if [ "$1" = "login" ]; then - show_usage "login" - exit 1 - fi mkdir -p "$HOME/.termux" unset NEW_SHELL @@ -44,18 +36,22 @@ set_shell() { if ! is_executable_file "$SHELL_TARGET"; then echo "The shell file '$SHELL_TARGET' is not an executable file." 1>&2 + echo + show_usage exit 1 fi if [ "$SHELL_TARGET" -ef "@TERMUX_PREFIX@/bin/login" ]; then echo "The shell file '$SHELL_TARGET' must not point to the '@TERMUX_PREFIX@/bin/login' script." 1>&2 + echo + show_usage exit 1 fi ln -sf "$SHELL_TARGET" "$HOME/.termux/shell" } -O=`getopt -l help -- hs: "$@"` +O=$(getopt -l help -- hs: "$@") eval set -- "$O" while true; do case "$1" in diff --git a/scripts/dalvikvm.in b/scripts/dalvikvm.in index d36df55..326fcd5 100644 --- a/scripts/dalvikvm.in +++ b/scripts/dalvikvm.in @@ -1,8 +1,8 @@ #!/bin/sh # There needs to be a folder at $ANDROID_DATA/dalvik-cache -export ANDROID_DATA=@TERMUX_PREFIX@/var/android/ -mkdir -p $ANDROID_DATA/dalvik-cache +export ANDROID_DATA="@TERMUX_PREFIX@/var/android/" +mkdir -p "$ANDROID_DATA/dalvik-cache" if [ -x /apex/com.android.art/bin/dalvikvm ]; then DALVIKVM="/apex/com.android.art/bin/dalvikvm" @@ -11,4 +11,4 @@ else fi unset LD_LIBRARY_PATH LD_PRELOAD -exec "$DALVIKVM" -Xusejit:true -Xnoimage-dex2oat -Djava.io.tmpdir=@TERMUX_PREFIX@/tmp "$@" +exec "$DALVIKVM" -Xusejit:true -Xnoimage-dex2oat -Djava.io.tmpdir="@TERMUX_PREFIX@/tmp" "$@" diff --git a/scripts/login.in b/scripts/login.in index e862089..461fb7f 100644 --- a/scripts/login.in +++ b/scripts/login.in @@ -20,8 +20,8 @@ if tty >/dev/null 2>&1 && [ $# = 0 ] && [ ! -f ~/.hushlogin ] && [ -z "$TERMUX_H [ ! -x ~/.termux/motd.sh ] && chmod u+x ~/.termux/motd.sh ~/.termux/motd.sh # Default to termux-tools package provided static motd file if it exists - elif [ -f @TERMUX_PREFIX@/etc/motd ]; then - cat @TERMUX_PREFIX@/etc/motd + elif [ -f "@TERMUX_PREFIX@/etc/motd" ]; then + cat "@TERMUX_PREFIX@/etc/motd" fi else # This variable shouldn't be kept set. @@ -29,8 +29,8 @@ else fi # TERMUX_VERSION env variable has been exported since v0.107 and PATH was being set to following value in <0.104. Last playstore version was v0.101. -if tty >/dev/null 2>&1 && [ $# = 0 ] && [ -f @TERMUX_PREFIX@/etc/motd-playstore ] && [ -z "$TERMUX_VERSION" ] && [ "$PATH" = "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets" ]; then - printf '\033[0;31m'; cat @TERMUX_PREFIX@/etc/motd-playstore; printf '\033[0m' +if tty >/dev/null 2>&1 && [ $# = 0 ] && [ -f "@TERMUX_PREFIX@/etc/motd-playstore" ] && [ -z "$TERMUX_VERSION" ] && [ "$PATH" = "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets" ]; then + printf '\033[0;31m'; cat "@TERMUX_PREFIX@/etc/motd-playstore"; printf '\033[0m' fi unset SHELL @@ -74,8 +74,8 @@ elif [ -f "@TERMUX_PREFIX@/lib/libtermux-exec.so" ]; then $SHELL -c "coreutils --coreutils-prog=true" > /dev/null 2>&1 || unset LD_PRELOAD fi -if [ -f @TERMUX_PREFIX@/etc/termux-login.sh ]; then - . @TERMUX_PREFIX@/etc/termux-login.sh +if [ -f "@TERMUX_PREFIX@/etc/termux-login.sh" ]; then + . "@TERMUX_PREFIX@/etc/termux-login.sh" fi if [ -n "$TERM" ]; then diff --git a/scripts/pkg.in b/scripts/pkg.in index 8fc9ea8..536d235 100644 --- a/scripts/pkg.in +++ b/scripts/pkg.in @@ -14,8 +14,7 @@ source "@TERMUX_PREFIX@/bin/termux-setup-package-manager" || exit 1 MIRROR_BASE_DIR="@TERMUX_PREFIX@/etc/termux/mirrors" show_help() { - local cache_size - local cache_dir="" + local cache_size cache_dir="" if [ "$TERMUX_APP_PACKAGE_MANAGER" = "apt" ]; then cache_dir="@TERMUX_CACHE_DIR@/apt/archives" elif [ "$TERMUX_APP_PACKAGE_MANAGER" = "pacman" ]; then @@ -66,8 +65,7 @@ show_help() { } check_mirror() { - local mirror="${1%/}" - local timeout="${2-5}" + local mirror="${1%/}" timeout="${2-5}" timeout "$((timeout + 1))" curl \ --head \ @@ -79,9 +77,8 @@ check_mirror() { } check_command() { - local command="$1" + local command="$1" errors - local errors if ! errors="$("$@" 2>&1 1>/dev/null)"; then echo "$errors" 1>&2 echo "Failed to run the '$command' command." 1>&2 @@ -96,13 +93,8 @@ check_command() { fi } -hostname() { - echo "$1" | awk -F'[/:]' '{print $4}' -} - last_modified() { - local mtime - local now + local mtime now mtime=$(date -r "$1" '+%s') now=$(date '+%s') @@ -136,9 +128,7 @@ unset_mirror_variables() { } get_mirror_url() { - local -r _mirror="$1" - local -r _has_repo_x11="$2" - local -r _has_repo_root="$3" + local -r _mirror="$1" _has_repo_x11="$2" _has_repo_root="$3" unset_mirror_variables # shellcheck source=/dev/null @@ -253,8 +243,7 @@ select_mirror() { declare -a parallel_jobs_return_values=() local i j mirror url job_number job_pid return_value - local total_mirrors=${#mirrors[@]} - local parallel_jobs_current_count=1 + local total_mirrors=${#mirrors[@]} parallel_jobs_current_count=1 has_repo_x11="$(has_repo x11)" has_repo_root="$(has_repo root)" @@ -328,8 +317,7 @@ select_mirror() { # Build weighted array of valid mirrors declare -a weighted_mirrors - local total_mirror_weight=0 - local weight + local total_mirror_weight=0 weight for mirror in "${!mirrors[@]}"; do # Check if mirror was unset in parallel check if [ -z "${mirrors[$mirror]-}" ]; then diff --git a/scripts/su.in b/scripts/su.in index 3d173ba..76c46f1 100644 --- a/scripts/su.in +++ b/scripts/su.in @@ -4,10 +4,10 @@ unset LD_LIBRARY_PATH LD_PRELOAD for p in /debug_ramdisk/su /sbin/su /system/sbin/su /system/bin/su /system/xbin/su /su/bin/su /magisk/.core/bin/su do - if [ -x $p ]; then + if [ -x "$p" ]; then # The su tool may require programs in PATH: PATH=/debug_ramdisk:/sbin:/sbin/su:/su/bin:/su/xbin:/system/bin:/system/xbin \ - exec $p "$@" + exec "$p" "$@" fi done diff --git a/scripts/termux-backup.in b/scripts/termux-backup.in index 4c05bb4..b5d8485 100644 --- a/scripts/termux-backup.in +++ b/scripts/termux-backup.in @@ -31,7 +31,7 @@ set -e -u -export PREFIX=@TERMUX_PREFIX@ +export PREFIX="@TERMUX_PREFIX@" msg() { echo "$*" >&2 diff --git a/scripts/termux-change-repo.in b/scripts/termux-change-repo.in index 666d440..8127192 100644 --- a/scripts/termux-change-repo.in +++ b/scripts/termux-change-repo.in @@ -6,139 +6,139 @@ source "@TERMUX_PREFIX@/bin/termux-setup-package-manager" || exit 1 MIRROR_BASE_DIR="@TERMUX_PREFIX@/etc/termux/mirrors" if [ "$1" == "--help" ] || [ "$1" == "-help" ]; then - echo "Script for choosing a group of mirrors to use." - echo "All mirrors are listed at" - echo "https://github.com/termux/termux-packages/wiki/Mirrors" - exit 0 + echo "Script for choosing a group of mirrors to use." + echo "All mirrors are listed at" + echo "https://github.com/termux/termux-packages/wiki/Mirrors" + exit 0 fi unlink_and_link() { - MIRROR_GROUP="$1" - if [ -L "@TERMUX_PREFIX@/etc/termux/chosen_mirrors" ]; then - unlink "@TERMUX_PREFIX@/etc/termux/chosen_mirrors" - fi - ln -s "${MIRROR_GROUP}" "@TERMUX_PREFIX@/etc/termux/chosen_mirrors" + MIRROR_GROUP="$1" + if [ -L "@TERMUX_PREFIX@/etc/termux/chosen_mirrors" ]; then + unlink "@TERMUX_PREFIX@/etc/termux/chosen_mirrors" + fi + ln -s "${MIRROR_GROUP}" "@TERMUX_PREFIX@/etc/termux/chosen_mirrors" } select_repository_group() { - MIRRORS=() - MIRRORS+=("All mirrors" "All in the entire world") - MIRRORS+=("Mirrors in Asia" "All in Asia (excl. Chinese Mainland and Russia)") - MIRRORS+=("Mirrors in Chinese Mainland" "All in Chinese Mainland") - MIRRORS+=("Mirrors in Europe" "All in Europe") - MIRRORS+=("Mirrors in North America" "All in North America") - MIRRORS+=("Mirrors in Oceania" "All in Oceania") - MIRRORS+=("Mirrors in Russia" "All in Russia") - - local TEMPFILE="$(mktemp @TERMUX_PREFIX@/tmp/mirror.XXXXXX)" - dialog \ - --title "termux-change-repo" --clear \ - --menu "Which group of mirrors do you want to use?" 0 0 0 \ - "${MIRRORS[@]}" --and-widget \ - 2> "$TEMPFILE" - retval=$? - clear - - case $retval in - 1) - # Cancel pressed - exit - ;; - 255) - # Esc pressed - exit - ;; - esac - - mirror_group="$(cat "$TEMPFILE")" - rm "$TEMPFILE" - - if [ "$mirror_group" == "Mirrors in Asia" ]; then - echo "[*] Mirrors in Asia (excl. Chinese Mainland and Russia) selected" - unlink_and_link ${MIRROR_BASE_DIR}/asia - - elif [ "$mirror_group" == "Mirrors in Chinese Mainland" ]; then - echo "[*] Mirrors in Chinese Mainland selected" - unlink_and_link ${MIRROR_BASE_DIR}/chinese_mainland - - elif [ "$mirror_group" == "Mirrors in Europe" ]; then - echo "[*] Mirrors in Europe selected" - unlink_and_link ${MIRROR_BASE_DIR}/europe - - elif [ "$mirror_group" == "Mirrors in North America" ]; then - echo "[*] Mirrors in North America selected" - unlink_and_link ${MIRROR_BASE_DIR}/north_america - - elif [ "$mirror_group" == "Mirrors in Oceania" ]; then - echo "[*] Mirrors in Oceania selected" - unlink_and_link ${MIRROR_BASE_DIR}/oceania - - elif [ "$mirror_group" == "Mirrors in Russia" ]; then - echo "[*] Mirrors in Russia selected" - unlink_and_link ${MIRROR_BASE_DIR}/russia - - elif [ "$mirror_group" == "All mirrors" ]; then - echo "[*] All mirrors selected" - unlink_and_link ${MIRROR_BASE_DIR}/all - - else - echo "[!] Error: unknown mirror group: '$1'. Exiting" - exit 1 - fi + MIRRORS=() + MIRRORS+=("All mirrors" "All in the entire world") + MIRRORS+=("Mirrors in Asia" "All in Asia (excl. Chinese Mainland and Russia)") + MIRRORS+=("Mirrors in Chinese Mainland" "All in Chinese Mainland") + MIRRORS+=("Mirrors in Europe" "All in Europe") + MIRRORS+=("Mirrors in North America" "All in North America") + MIRRORS+=("Mirrors in Oceania" "All in Oceania") + MIRRORS+=("Mirrors in Russia" "All in Russia") + + local TEMPFILE="$(mktemp "@TERMUX_PREFIX@/tmp/mirror.XXXXXX")" + dialog \ + --title "termux-change-repo" --clear \ + --menu "Which group of mirrors do you want to use?" 0 0 0 \ + "${MIRRORS[@]}" --and-widget \ + 2> "$TEMPFILE" + retval=$? + clear + + case $retval in + 1) + # Cancel pressed + exit + ;; + 255) + # Esc pressed + exit + ;; + esac + + mirror_group="$(cat "$TEMPFILE")" + rm "$TEMPFILE" + + if [ "$mirror_group" == "Mirrors in Asia" ]; then + echo "[*] Mirrors in Asia (excl. Chinese Mainland and Russia) selected" + unlink_and_link "${MIRROR_BASE_DIR}/asia" + + elif [ "$mirror_group" == "Mirrors in Chinese Mainland" ]; then + echo "[*] Mirrors in Chinese Mainland selected" + unlink_and_link "${MIRROR_BASE_DIR}/chinese_mainland" + + elif [ "$mirror_group" == "Mirrors in Europe" ]; then + echo "[*] Mirrors in Europe selected" + unlink_and_link "${MIRROR_BASE_DIR}/europe" + + elif [ "$mirror_group" == "Mirrors in North America" ]; then + echo "[*] Mirrors in North America selected" + unlink_and_link "${MIRROR_BASE_DIR}/north_america" + + elif [ "$mirror_group" == "Mirrors in Oceania" ]; then + echo "[*] Mirrors in Oceania selected" + unlink_and_link "${MIRROR_BASE_DIR}/oceania" + + elif [ "$mirror_group" == "Mirrors in Russia" ]; then + echo "[*] Mirrors in Russia selected" + unlink_and_link "${MIRROR_BASE_DIR}/russia" + + elif [ "$mirror_group" == "All mirrors" ]; then + echo "[*] All mirrors selected" + unlink_and_link "${MIRROR_BASE_DIR}/all" + + else + echo "[!] Error: unknown mirror group: '$1'. Exiting" + exit 1 + fi } get_mirror_url() { - echo "${1##*/}" + echo "${1##*/}" } get_mirror_description() { - local -a lines - readarray -t lines < "$1" - local mirror_description="${lines[1]#* }" - mirror_description="${mirror_description//Mirror by /M: }" - mirror_description="${mirror_description//. Hosted in /. }" - mirror_description="${mirror_description%.}" - printf '%s\n' "$mirror_description" + local -a lines + readarray -t lines < "$1" + local mirror_description="${lines[1]#* }" + mirror_description="${mirror_description//Mirror by /M: }" + mirror_description="${mirror_description//. Hosted in /. }" + mirror_description="${mirror_description%.}" + printf '%s\n' "$mirror_description" } select_individual_mirror() { - mirrors=($(find ${MIRROR_BASE_DIR}/{asia,chinese_mainland,europe,north_america,oceania,russia}/ -type f ! -name "*\.dpkg-old" ! -name "*\.dpkg-new" ! -name "*~")) - - # Choose default mirror per default - MIRRORS=("$(get_mirror_url "${MIRROR_BASE_DIR}/default")" "$(get_mirror_description "${MIRROR_BASE_DIR}/default")") - # Special handling of packages.termux.dev mirror to put it on top: - MIRRORS+=("$(get_mirror_url "${MIRROR_BASE_DIR}/europe/packages.termux.dev")" "$(get_mirror_description "${MIRROR_BASE_DIR}/europe/packages.termux.dev")") - for mirror in ${mirrors[@]}; do - mirror_url=$(get_mirror_url "$mirror") - if [ "$mirror_url" == "packages.termux.dev" ]; then continue; fi - MIRRORS+=("$mirror_url" "$(get_mirror_description "$mirror")") - done - - local TEMPFILE="$(mktemp @TERMUX_PREFIX@/tmp/mirror.XXXXXX)" - dialog \ - --title "termux-change-repo" --clear \ - --menu "Which mirror do you want to use?" 0 0 0 \ - "${MIRRORS[@]}" --and-widget \ - 2> "$TEMPFILE" - retval=$? - clear - - case $retval in - 1) - # Cancel pressed - exit - ;; - 255) - # Esc pressed - exit - ;; - esac - - mirror="$(cat "$TEMPFILE")" - - echo "[*] Mirror $(get_mirror_url "$mirror") selected" - unlink_and_link "$(find ${MIRROR_BASE_DIR} -name $mirror)" - rm "$TEMPFILE" + mirrors=($(find "${MIRROR_BASE_DIR}"/{asia,chinese_mainland,europe,north_america,oceania,russia}/ -type f ! -name "*\.dpkg-old" ! -name "*\.dpkg-new" ! -name "*~")) + + # Choose default mirror per default + MIRRORS=("$(get_mirror_url "${MIRROR_BASE_DIR}/default")" "$(get_mirror_description "${MIRROR_BASE_DIR}/default")") + # Special handling of packages.termux.dev mirror to put it on top: + MIRRORS+=("$(get_mirror_url "${MIRROR_BASE_DIR}/europe/packages.termux.dev")" "$(get_mirror_description "${MIRROR_BASE_DIR}/europe/packages.termux.dev")") + for mirror in ${mirrors[@]}; do + mirror_url=$(get_mirror_url "$mirror") + if [ "$mirror_url" == "packages.termux.dev" ]; then continue; fi + MIRRORS+=("$mirror_url" "$(get_mirror_description "$mirror")") + done + + local TEMPFILE="$(mktemp "@TERMUX_PREFIX@/tmp/mirror.XXXXXX")" + dialog \ + --title "termux-change-repo" --clear \ + --menu "Which mirror do you want to use?" 0 0 0 \ + "${MIRRORS[@]}" --and-widget \ + 2> "$TEMPFILE" + retval=$? + clear + + case $retval in + 1) + # Cancel pressed + exit + ;; + 255) + # Esc pressed + exit + ;; + esac + + mirror="$(cat "$TEMPFILE")" + + echo "[*] Mirror $(get_mirror_url "$mirror") selected" + unlink_and_link "$(find "${MIRROR_BASE_DIR}" -name "$mirror")" + rm "$TEMPFILE" } usage() { @@ -149,54 +149,54 @@ usage() { } if [ $# -gt 0 ]; then - usage + usage fi if ! command -v apt 1>/dev/null; then - echo "Error: Cannot change mirrors since apt is not installed." >&2 - exit 1 + echo "Error: Cannot change mirrors since apt is not installed." >&2 + exit 1 fi if [ "$TERMUX_APP_PACKAGE_MANAGER" = "pacman" ]; then - read -p "Warning: termux-change-repo can only change mirrors for apt, is that what you intended? [y|n] " -n 1 -r - echo - [[ ${REPLY} =~ ^[Nn]$ ]] && exit + read -p "Warning: termux-change-repo can only change mirrors for apt, is that what you intended? [y|n] " -n 1 -r + echo + [[ "${REPLY}" =~ ^[Nn]$ ]] && exit fi mkdir -p "@TERMUX_PREFIX@/tmp" || exit $? -TEMPFILE="$(mktemp @TERMUX_PREFIX@/tmp/termux-change-repo.XXXXXX)" +TEMPFILE="$(mktemp "@TERMUX_PREFIX@/tmp/termux-change-repo.XXXXXX")" MODES=() MODES+=("Mirror group" "Rotate between several mirrors (recommended)") MODES+=("Single mirror" "Choose a single mirror to use") dialog \ - --title "termux-change-repo" --clear \ - --menu "Do you want to choose a mirror group or a single mirror?" 0 0 0 \ - "${MODES[@]}" --and-widget \ - 2> "$TEMPFILE" + --title "termux-change-repo" --clear \ + --menu "Do you want to choose a mirror group or a single mirror?" 0 0 0 \ + "${MODES[@]}" --and-widget \ + 2> "$TEMPFILE" retval=$? clear case $retval in - 0) - case "$(cat $TEMPFILE)" in - "Mirror group") - select_repository_group - ;; - "Single mirror") - select_individual_mirror - ;; - esac - ;; - 1) - # Cancel pressed - exit - ;; - 255) - # Esc pressed - exit - ;; + 0) + case "$(cat "$TEMPFILE")" in + "Mirror group") + select_repository_group + ;; + "Single mirror") + select_individual_mirror + ;; + esac + ;; + 1) + # Cancel pressed + exit + ;; + 255) + # Esc pressed + exit + ;; esac rm "$TEMPFILE" diff --git a/scripts/termux-info.in b/scripts/termux-info.in index 9cfc07f..04d58d3 100644 --- a/scripts/termux-info.in +++ b/scripts/termux-info.in @@ -44,9 +44,8 @@ updates() { } repo_subscriptions_apt() { - local apt_dir="@TERMUX_PREFIX@/etc/apt" + local apt_dir="@TERMUX_PREFIX@/etc/apt" filename source_entry repo_package sources_type - local filename source_entry repo_package sources_type for filename in "${apt_dir}"/sources.list{,.d/*}; do [[ -f "$filename" ]] || continue case "$filename" in @@ -148,7 +147,7 @@ escaped_package_name="$(echo -n "@TERMUX_APP_PACKAGE@" | sed -zE -e 's/[][\.|$() show_version_code="" sdk_version="$(getprop ro.build.version.sdk || :)" if [[ "$sdk_version" =~ ^[0-9]+$ ]] && [ "$sdk_version" -ge "26" ]; then - show_version_code="--show-versioncode" + show_version_code="--show-versioncode" fi TERMUX_PLUGINS="$(pm list packages --user "$TERMUX__USER_ID" $show_version_code 2>&1 &2 } @@ -80,7 +78,7 @@ fi case "$1" in -\?|-h|--help|--usage) show_usage; exit 0;; - *) BACKUP_FILE_PATH=$1;; + *) BACKUP_FILE_PATH="$1";; esac if [ "$BACKUP_FILE_PATH" != "-" ] && [ ! -e "$BACKUP_FILE_PATH" ]; then