]>
Commit | Line | Data |
---|---|---|
8efd092d ER |
1 | #!/bin/sh |
2 | # cleanup distfiles like files, i.e archives that can be likely be | |
3 | # re-downloaded. | |
4 | ||
5 | # be sure we are in right dir | |
6 | dir=$(dirname "$0") | |
7 | cd "$dir" | |
8 | ||
f4c98098 | 9 | ext=bz2,gz,rar,tgz,tbz2,zip,jar,Z,tar,png,ico,xpm,gif,rpm,bin,run,exe,iso,xpi,ZIP,dll,pdf |
dbb9b05b ER |
10 | ls -ldrSh */*.{$ext} |
11 | echo */*.{$ext} | xargs stat -c %s | awk '{s+=$1} END {printf("Total: %d MiB\n", s/1014/1024)}' | |
8efd092d ER |
12 | |
13 | echo remove? ctrl+c to abort | |
14 | read a | |
15 | ||
16 | rm -vf */*.{$ext} |