make operations mutually exclusive
This commit is contained in:
parent
7bd6f369e7
commit
91359306aa
2
.vscode/numbered-bookmarks.json
vendored
2
.vscode/numbered-bookmarks.json
vendored
@ -4,7 +4,7 @@
|
|||||||
"fsPath": "$ROOTPATH$/borghelper.sh",
|
"fsPath": "$ROOTPATH$/borghelper.sh",
|
||||||
"bookmarks": [
|
"bookmarks": [
|
||||||
-1,
|
-1,
|
||||||
257,
|
253,
|
||||||
151,
|
151,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
|
@ -246,17 +246,13 @@ export TMPDIR="${borgBaseDir}/tmp"
|
|||||||
# info operations
|
# info operations
|
||||||
if [ "$operation" = 'info' ]; then
|
if [ "$operation" = 'info' ]; then
|
||||||
borg info ::"${archiveName}"
|
borg info ::"${archiveName}"
|
||||||
fi
|
|
||||||
|
|
||||||
# list operations
|
# list operations
|
||||||
if [ "$operation" = 'listall' ]; then
|
elif [ "$operation" = 'listall' ]; then
|
||||||
borg list
|
borg list
|
||||||
elif [ "$operation" = 'viewarchive' ]; then
|
elif [ "$operation" = 'viewarchive' ]; then
|
||||||
borg list ::"${archiveName}"
|
borg list ::"${archiveName}"
|
||||||
fi
|
|
||||||
|
|
||||||
# restore operations
|
# restore operations
|
||||||
if [ "$operation" = 'restore' ]; then
|
elif [ "$operation" = 'restore' ]; then
|
||||||
if [ -z "$fileName" ]; then
|
if [ -z "$fileName" ]; then
|
||||||
# restore entire archive
|
# restore entire archive
|
||||||
cd "$restorePath" || consoleError 4 'Could not change to restore directory.'
|
cd "$restorePath" || consoleError 4 'Could not change to restore directory.'
|
||||||
|
Loading…
Reference in New Issue
Block a user