diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-11-20 20:30:18 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-11-20 20:30:18 +0100 |
commit | 8ca93f2c2b4daf6b67febb52ed157761d90dd6be (patch) | |
tree | 7eb5a2b519722fb605a2a01c772a5610dd6101a3 | |
parent | f72d539f30149b958b4ed0bcebe7d0af62bd444e (diff) | |
download | vcs-rebuild-8ca93f2c2b4daf6b67febb52ed157761d90dd6be.tar.xz |
Revert "Make get_pkgver_sha work on strings"
This reverts commit 5d6ba702cb6e80730d450882fee4b2673b82deb7.
-rwxr-xr-x | build-updated-packages.bash | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/build-updated-packages.bash b/build-updated-packages.bash index 037473f..197c536 100755 --- a/build-updated-packages.bash +++ b/build-updated-packages.bash @@ -8,24 +8,16 @@ cd "$PKGBUILD_DIR" # Get commit sha from PKGVER of PKGBUILD # # Arguments: -# $1 Whether the source is a PKGBUILD or string -# $2 Path to the directory containing the PKGBUILD +# $1 Path to the directory containing the PKGBUILD # to get the sha from get_pkgver_sha() { - if [[ "$1" -eq "pkgbuild" ]]; then - source "$1"/PKGBUILD - elif [[ "$1" -eq "string" ]]; then - pkgver="$2" - else - printf "%s\n" "get_pkgver_sha failed" 1>&2 - fi - - printf "%s" "$(sed -r 's/.*\.r[0-9]*\.g?//' <<<$pkgver)" + (source "$1"/PKGBUILD + printf "%s" "$(sed -r 's/.*\.r[0-9]*\.g?//' <<<$pkgver)") } main() { for package in "${packages[@]}"; do - old_version[$package]=$(get_pkgver_sha "pkgbuild" "$package") + old_version[$package]=$(get_pkgver_sha "$package") (cd "$package" makepkg --nobuild &>/dev/null) & done @@ -33,7 +25,7 @@ main() { local needs_rebuild=() for package in "${packages[@]}"; do - new_head=$(get_pkgver_sha "pkgbuild" "$package") + new_head=$(get_pkgver_sha "$package") if [[ "${old_version[$package]}" != "$new_head" ]]; then needs_rebuild+=("$package") |