From cd7e911baa22ae51ab5080851dd2bf378d7ef829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:20:41 +0200 Subject: [PATCH] ncp-restore: Fix wrong variable name --- bin/ncp-restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ncp-restore b/bin/ncp-restore index 0e0c88516..e671e5f71 100755 --- a/bin/ncp-restore +++ b/bin/ncp-restore @@ -17,7 +17,7 @@ DIR="$( cd "$( dirname "$BACKUPFILE" )" &>/dev/null && pwd )" #abspath [[ "$DIR" =~ "$NCDIR".* ]] && { echo "Refusing to restore from $NCDIR"; exit 1; } TMPDIR="$( mktemp -d "$( dirname "$BACKUPFILE" )"/ncp-restore.XXXXXX )" || { echo "Failed to create temp dir" >&2; exit 1; } -[[ "$(stat -fc%T "${BASEDIR}")" =~ ext|btrfs|zfs ]] || { echo "Can only restore from ext/btrfs/zfs filesystems (found '$(stat -fc%T "${TMPDIR}")" >&2; exit 1; } +[[ "$(stat -fc%T "${TMPDIR}")" =~ ext|btrfs|zfs ]] || { echo "Can only restore from ext/btrfs/zfs filesystems (found '$(stat -fc%T "${TMPDIR}")" >&2; exit 1; } TMPDIR="$( cd "$TMPDIR" &>/dev/null && pwd )" || { echo "$TMPDIR not found"; exit 1; } #abspath cleanup(){ local RET=$?; echo "Cleanup..."; rm -rf "${TMPDIR}"; trap "" EXIT; exit $RET; }