summaryrefslogtreecommitdiff
path: root/misc-scripts/sourceballs-cleanup
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-08 16:03:11 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-08 16:03:11 +0200
commit830c4d84d13712974ffd392cdcc58b038c0dcfd9 (patch)
tree43ebdbef0d019de1d6dfda8a1f4a98dc94284375 /misc-scripts/sourceballs-cleanup
parent8a377f398ef5a01f8b52695597152c49d7a64f96 (diff)
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.
Diffstat (limited to 'misc-scripts/sourceballs-cleanup')
-rwxr-xr-xmisc-scripts/sourceballs-cleanup3
1 files changed, 2 insertions, 1 deletions
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