mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update contrib/nuke-graph-directory.sh
Signed-off-by: Brett Milford <brettmilford@gmail.com>
This commit is contained in:
parent
398cb1dc4f
commit
a0d1a1f78c
1 changed files with 5 additions and 7 deletions
|
@ -60,13 +60,11 @@ if command -v btrfs > /dev/null 2>&1; then
|
||||||
# Find btrfs subvolumes under $dir checking for inode 256
|
# Find btrfs subvolumes under $dir checking for inode 256
|
||||||
# Source: http://stackoverflow.com/a/32865333
|
# Source: http://stackoverflow.com/a/32865333
|
||||||
for subvol in $(find "$dir" -type d -inum 256 | sort -r); do
|
for subvol in $(find "$dir" -type d -inum 256 | sort -r); do
|
||||||
if [ "$dir" != "$subvol" ]; then
|
if [ "$dir" != "$subvol" ] && subvolType="$(stat -f --format=%T "$subvol")" && [ "$subvolType" = "btrfs" ]; then
|
||||||
if [ "$(stat -f --format=%T $subvol)" == "btrfs" ]; then
|
(
|
||||||
(
|
set -x
|
||||||
set -x
|
btrfs subvolume delete "$subvol"
|
||||||
btrfs subvolume delete "$subvol"
|
)
|
||||||
)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue