1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #16194 from yosifkit/fix-nuke

Fix nuke script
This commit is contained in:
Tianon Gravi 2015-09-11 10:26:22 -07:00
commit f9e5a693ed

View file

@ -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