Revert "shorten snaplink"

This reverts commit a51090514e.
This commit is contained in:
Motiejus Jakštys 2023-01-05 14:59:12 +02:00
parent a51090514e
commit 0d59d3ae81

View File

@ -1,7 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
snap_path="$SANOID_TARGET/.zfs/snapshot/$SANOID_SNAPNAME" snap_path="$SANOID_TARGET/.zfs/snapshot/$SANOID_SNAPNAME"
[[ -d "$snap_path" ]] || { >&2 echo "expected directory $snap_path"; exit 1; } [[ -d "$snap_path" ]] || {
>&2 echo "expected to find a directory in $snap_path"
exit 1
}
link_path="$SANOID_TARGET/.snapshot-latest" link_path="$SANOID_TARGET/.snapshot-latest"
ln -sf "$snap_path" "$link_path" ln -sf "$snap_path" "$link_path"
>&2 printf "successfully created %s -> %s\n" "$link_path" "$snap_path" >&2 printf "successfully created %s -> %s\n" "$link_path" "$snap_path"