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:
Akihiro Suda
2020-03-03 12:27:49 +09:00
parent eb484fcb67
commit 3cf82748dd
50 changed files with 513 additions and 441 deletions

View File

@@ -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"/*
)