43 lines
763 B
Bash
Raw Normal View History

#! /bin/bash
set -e
2021-03-02 16:44:24 -05:00
positional=()
while [[ $# -gt 0 ]]; do
argument="$1"
case $argument in
-h|--help)
printf "%s\n" \
"Usage: qr-clone.sh [options]" \
"" \
"Options:" \
2021-03-06 14:39:16 -05:00
" -h, --help display help for command"
2021-03-02 16:44:24 -05:00
exit 0
;;
*)
positional+=("$1")
shift
;;
esac
done
set -- "${positional[@]}"
2021-02-25 15:00:00 -05:00
tput reset
printf "%s\n" "Restoring…"
printf "%s\n" "Type qr-restore.sh options and press enter (see “qr-restore.sh --help”)"
read -r qr_restore_options
. qr-restore.sh $qr_restore_options
if [ -n "$secret" ]; then
printf "%s\n" "Backing up…"
printf "%s\n" "Type qr-backup.sh options and press enter (see “qr-backup.sh --help”)"
read -r qr_backup_options
. qr-backup.sh $qr_backup_options
fi