make operations mutually exclusive

This commit is contained in:
Asif Bacchus 2020-03-26 04:44:29 -06:00
parent 7bd6f369e7
commit 91359306aa
2 changed files with 3 additions and 7 deletions

View File

@ -4,7 +4,7 @@
"fsPath": "$ROOTPATH$/borghelper.sh",
"bookmarks": [
-1,
257,
253,
151,
-1,
-1,

View File

@ -246,17 +246,13 @@ export TMPDIR="${borgBaseDir}/tmp"
# info operations
if [ "$operation" = 'info' ]; then
borg info ::"${archiveName}"
fi
# list operations
if [ "$operation" = 'listall' ]; then
elif [ "$operation" = 'listall' ]; then
borg list
elif [ "$operation" = 'viewarchive' ]; then
borg list ::"${archiveName}"
fi
# restore operations
if [ "$operation" = 'restore' ]; then
elif [ "$operation" = 'restore' ]; then
if [ -z "$fileName" ]; then
# restore entire archive
cd "$restorePath" || consoleError 4 'Could not change to restore directory.'