Skip to content

Commit 0850509

Browse files
committed
Quickly free up space with perl
1 parent ce5b7e5 commit 0850509

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ci/scripts/free-disk-space.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
# # ======
55
# MACROS
66
# ======
7-
7+
set -e
88
fast_rmdir() {
9-
if [[ -d "$1" ]] && [[ -n "$1" ]] && [[ ! "$1" = "/" ]] && [[ ! "$1" = "~" ]]; then
10-
echo "Removing directory: $1"
11-
sudo find "$1" -type f -delete -print | wc -l
12-
sudo rm -rf "$1"
13-
fi
9+
cd "$@"
10+
sudo perl -e 'for(<*>){((stat)[9]<(unlink))}'
1411
}
1512

1613
list_installed_dpkg() {

0 commit comments

Comments
 (0)