Fix nuke script to remove from end of path
Signed-off-by: Joe Ferguson <joe@infosiftr.com>
This commit is contained in:
parent
5ff63b6946
commit
d2e9f6c0c1
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ done
|
|||
# now, let's go destroy individual btrfs subvolumes, if any exist
|
||||
if command -v btrfs > /dev/null 2>&1; then
|
||||
root="$(df "$dir" | awk 'NR>1 { print $NF }')"
|
||||
root="${root#/}" # if root is "/", we want it to become ""
|
||||
root="${root%/}" # if root is "/", we want it to become ""
|
||||
for subvol in $(btrfs subvolume list -o "$root/" 2>/dev/null | awk -F' path ' '{ print $2 }' | sort -r); do
|
||||
subvolDir="$root/$subvol"
|
||||
if dir_in_dir "$subvolDir" "$dir"; then
|
||||
|
|
Loading…
Reference in a new issue