Testing
This commit is contained in:
parent
6ab45ff490
commit
799c417f90
1 changed files with 3 additions and 2 deletions
|
@ -12,14 +12,15 @@ fi
|
||||||
SNAPPER_CONFIG="$1"
|
SNAPPER_CONFIG="$1"
|
||||||
|
|
||||||
# Get the actual snapshot location from snapper config
|
# Get the actual snapshot location from snapper config
|
||||||
SOURCE_PATH=$(sudo snapper -c "$SNAPPER_CONFIG" get-config | grep '^SUBVOLUME' | cut -d'=' -f2 | tr -d '"'| awk {'print $3'})
|
SOURCE_PATH=$(sudo snapper -c "$SNAPPER_CONFIG" get-config | grep '^SUBVOLUME' | cut -d'=' -f2 | tr -d '"'| awk {'print $3'})
|
||||||
|
echo "SOURCE_PATH: $SOUCE_PATH"
|
||||||
if [ -z "$SOURCE_PATH" ]; then
|
if [ -z "$SOURCE_PATH" ]; then
|
||||||
echo "ERROR: Could not determine snapshot path for config '$SNAPPER_CONFIG'"
|
echo "ERROR: Could not determine snapshot path for config '$SNAPPER_CONFIG'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Convert subvolume path to snapshot path
|
# Convert subvolume path to snapshot path
|
||||||
SNAPSHOT_PATH="$SOURCE_PATH/.snapshots"
|
SNAPSHOT_PATH="$SOURCE_PATH.snapshots"
|
||||||
if [ ! -d "$SNAPSHOT_PATH" ]; then
|
if [ ! -d "$SNAPSHOT_PATH" ]; then
|
||||||
echo "ERROR: Snapshot directory '$SNAPSHOT_PATH' does not exist"
|
echo "ERROR: Snapshot directory '$SNAPSHOT_PATH' does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue