Complete the half-done work of previous commit

This commit is contained in:
Zertrin 2013-11-13 21:56:12 +01:00
parent 03ef054cf3
commit 54f9aaf27a

View file

@ -82,7 +82,7 @@ echo "USAGE:
while getopts ":c:t:bfvlsnd-:" opt; do while getopts ":c:t:bfvlsnd-:" opt; do
case $opt in case $opt in
# parse long options (a bit tricky because builtin getopts does not # parse long options (a bit tricky because builtin getopts does not
# manage long options and i don't want to impose GNU getopt dependancy) # manage long options and I don't want to impose GNU getopt dependancy)
-) -)
case "$OPTARG" in case "$OPTARG" in
# --restore [restore dest] # --restore [restore dest]
@ -597,16 +597,17 @@ case "$COMMAND" in
duplicity_backup duplicity_backup
;; ;;
"restore-file") "restore-file"|"restore-dir")
ROOT=$DEST ROOT=$DEST
OPTION= OPTION="restore"
if [ ! -z "$TIME" ]; then if [ ! -z "$TIME" ]; then
STATIC_OPTIONS="$STATIC_OPTIONS --time $TIME" STATIC_OPTIONS="$STATIC_OPTIONS --time $TIME"
fi fi
if [[ ! "$FILE_TO_RESTORE" ]]; then if [[ ! "$FILE_TO_RESTORE" ]]; then
echo "Which file do you want to restore (eg, mail/letter.txt):" echo "Which file or directory do you want to restore?"
echo "(give the path relative to the root of the backup eg, mail/letter.txt):"
read -e FILE_TO_RESTORE read -e FILE_TO_RESTORE
echo echo
fi fi
@ -633,7 +634,7 @@ case "$COMMAND" in
setup_passphrase setup_passphrase
echo "Restoring now ..." echo "Restoring now ..."
#use INCLUDE variable without create another one #use INCLUDE variable without creating another one
INCLUDE="--file-to-restore ${FILE_TO_RESTORE}" INCLUDE="--file-to-restore ${FILE_TO_RESTORE}"
duplicity_backup duplicity_backup
;; ;;