mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
run shfmt
git grep --name-only '^#!' | egrep -v '(vendor|\.go|Jenkinsfile)' | xargs shfmt -w -bn -ci -sr Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -31,7 +31,10 @@ echo "Nuking $dir ..."
|
||||
echo ' (if this is wrong, press Ctrl+C NOW!)'
|
||||
echo
|
||||
|
||||
( set -x; sleep 10 )
|
||||
(
|
||||
set -x
|
||||
sleep 10
|
||||
)
|
||||
echo
|
||||
|
||||
dir_in_dir() {
|
||||
@@ -45,7 +48,10 @@ dir_in_dir() {
|
||||
for mount in $(awk '{ print $5 }' /proc/self/mountinfo); do
|
||||
mount="$(readlink -f "$mount" || true)"
|
||||
if [ "$dir" != "$mount" ] && dir_in_dir "$mount" "$dir"; then
|
||||
( set -x; umount -f "$mount" )
|
||||
(
|
||||
set -x
|
||||
umount -f "$mount"
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -55,10 +61,17 @@ if command -v btrfs > /dev/null 2>&1; then
|
||||
# Source: http://stackoverflow.com/a/32865333
|
||||
for subvol in $(find "$dir" -type d -inum 256 | sort -r); do
|
||||
if [ "$dir" != "$subvol" ]; then
|
||||
( set -x; btrfs subvolume delete "$subvol" )
|
||||
(
|
||||
set -x
|
||||
btrfs subvolume delete "$subvol"
|
||||
)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# finally, DESTROY ALL THINGS
|
||||
( shopt -s dotglob; set -x; rm -rf "$dir"/* )
|
||||
(
|
||||
shopt -s dotglob
|
||||
set -x
|
||||
rm -rf "$dir"/*
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user