Implemented duplicate feature
This commit is contained in:
parent
4b0273549f
commit
fd7da45d10
8 changed files with 106 additions and 90 deletions
|
@ -11,9 +11,14 @@ while [[ $# -gt 0 ]]; do
|
|||
"Usage: qr-clone.sh [options]" \
|
||||
"" \
|
||||
"Options:" \
|
||||
" -h, --help display help for command"
|
||||
" --duplicate duplicate content" \
|
||||
" -h, --help display help for command"
|
||||
exit 0
|
||||
;;
|
||||
--duplicate)
|
||||
duplicate=true
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
positional+=("$1")
|
||||
shift
|
||||
|
@ -23,19 +28,24 @@ done
|
|||
|
||||
set -- "${positional[@]}"
|
||||
|
||||
bold=$(tput bold)
|
||||
normal=$(tput sgr0)
|
||||
|
||||
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
|
||||
if [ -z "$duplicate" ]; then
|
||||
printf "$bold%s$normal\n" "Type qr-restore.sh options and press enter (see “qr-restore.sh --help”)"
|
||||
read -r qr_restore_options
|
||||
fi
|
||||
|
||||
. qr-restore.sh $qr_restore_options
|
||||
|
||||
if [ -n "$secret" ]; then
|
||||
if [ -n "$secret" ] || [ -n "$encrypted_secret" ]; then
|
||||
printf "%s\n" "Backing up…"
|
||||
|
||||
printf "%s\n" "Type qr-backup.sh options and press enter (see “qr-backup.sh --help”)"
|
||||
printf "$bold%s$normal\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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue