summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-03-31 22:17:30 -0400
committerDave Reisner <dreisner@archlinux.org>2012-04-08 22:28:45 -0400
commitec91133e38cb7c486ec995d4183f30e84f3ca736 (patch)
treef7ff09b6c01fbb806a7c8b6f30f99694c34916b7
parent30ca48df4ca51b57ca8bc0e45f78d3eac8c15b40 (diff)
downloadpacman-ec91133e38cb7c486ec995d4183f30e84f3ca736.tar.xz
autoclean.sh: abide by POSIX shebang
Avoid non-POSIX brace expansion and rely on find to locate and destroy files outside the root. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xautoclean.sh24
1 files changed, 7 insertions, 17 deletions
diff --git a/autoclean.sh b/autoclean.sh
index 8f45d561..900f3536 100755
--- a/autoclean.sh
+++ b/autoclean.sh
@@ -1,9 +1,9 @@
#!/bin/sh -xu
[ -f Makefile ] && make distclean
+
rm -rf autom4te.cache
-rm -f {Makefile.in,Makefile}
-rm -f {config.h.in,config.h}
+rm -f config.h.in config.h
rm -f config.status
rm -f configure
rm -f stamp*
@@ -11,22 +11,12 @@ rm -f aclocal.m4
rm -f compile
rm -f libtool
-rm -f lib/libalpm/{Makefile.in,Makefile}
-rm -f src/util/{Makefile.in,Makefile}
-rm -f src/pacman/{Makefile.in,Makefile}
-rm -f scripts/{Makefile.in,Makefile}
-rm -f etc/{Makefile.in,Makefile}
-rm -f etc/pacman.d/{Makefile.in,Makefile}
-rm -f etc/abs/{Makefile.in,Makefile}
-rm -f test/{pacman,util}{,/tests}/{Makefile.in,Makefile}
-rm -f contrib/{Makefile.in,Makefile}
-rm -f doc/{Makefile.in,Makefile}
-
rm -f test/pacman/*.pyc
rm -f doc/html/*.html
rm -f doc/man3/*.3
-rm -f {lib/libalpm,scripts,src/pacman}/po/{Makefile.in,Makefile}
-rm -f {lib/libalpm,scripts,src/pacman}/po/POTFILES
-rm -f {lib/libalpm,scripts,src/pacman}/po/stamp-po
-rm -f {lib/libalpm,scripts,src/pacman}/po/*.gmo
+find . \( -name 'Makefile' -o \
+ -name 'Makefile.in' -o \
+ -path '*/po/POTFILES' -o \
+ -path '*/po/stamp-po' -o \
+ -path '*/po/*.gmo' \) -exec rm -f {} +