From 830c4d84d13712974ffd392cdcc58b038c0dcfd9 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Aug 2010 16:03:11 +0200 Subject: Source PKGBUILD in subshells This patch sources a PKGBUILD in a subshells instead of directly. This way we don't polute our scope or overwrite our vars which might lead to unexpected behavior. --- misc-scripts/sourceballs-cleanup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'misc-scripts/sourceballs-cleanup') diff --git a/misc-scripts/sourceballs-cleanup b/misc-scripts/sourceballs-cleanup index e058c38..e407989 100755 --- a/misc-scripts/sourceballs-cleanup +++ b/misc-scripts/sourceballs-cleanup @@ -14,7 +14,8 @@ remove_old() { PKGVERS="" for repo in *; do cd "$repo" - . "PKGBUILD" + pkgver=$(. PKGBUILD; echo ${pkgver}) + pkgrel=$(. PKGBUILD; echo ${pkgrel}) PKGVERS="$PKGVERS $pkgver-$pkgrel" cd .. done -- cgit v1.2.3-24-g4f1b