diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-08-08 16:03:11 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-08-08 16:03:11 +0200 |
commit | 830c4d84d13712974ffd392cdcc58b038c0dcfd9 (patch) | |
tree | 43ebdbef0d019de1d6dfda8a1f4a98dc94284375 /misc-scripts/sourceballs-cleanup | |
parent | 8a377f398ef5a01f8b52695597152c49d7a64f96 (diff) | |
download | dbscripts-830c4d84d13712974ffd392cdcc58b038c0dcfd9.tar.gz dbscripts-830c4d84d13712974ffd392cdcc58b038c0dcfd9.tar.xz |
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-x | misc-scripts/sourceballs-cleanup | 3 |
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 |