index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-23 16:23:24 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-23 16:23:24 +0200 |
commit | 858e08ab93d84a485edb60b066d4168199a26361 (patch) | |
tree | 9c50abbc6fd2be5e583ff6b8fcfbf83b3bf5eb6f /bin | |
parent | c50f770046dc8a95c3d8454f8f67a154e21f4f56 (diff) |
-rwxr-xr-x | bin/common-functions | 19 |
diff --git a/bin/common-functions b/bin/common-functions index 714a05a..458391f 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -9,24 +9,27 @@ # mangle $arch in PKBUILDs to contain i486, i586, i686 -# find_pkgbuild repository package +# find_pkgbuild package repository # find the PKGBUILD of $package from $repository find_pkgbuild() { + local package="$1" + local repository="$2" + local PKGBUILD='' local repo local file local package_path - if [ -f "${repo_paths__archlinux32}/$2/$1/PKGBUILD" ]; then + if [ -f "${repo_paths__archlinux32}/${repository}/${package}/PKGBUILD" ]; then # If this package has some modification, - repo="$(find_git_repository_to_package_repository "$2")" - eval package_path="$(printf '$repo_paths__%s' "${repo}")/$1" + repo="$(find_git_repository_to_package_repository "${repository}")" + eval package_path="$(printf '$repo_paths__%s' "${repo}")/${package}" if ! [ -d "${package_path}" ]; then # create some dummy files if it is also new. - mkdir -p "${package_path}/repos/$2-x86_64" - touch "${package_path}/repos/$2-x86_64/PKGBUILD" + mkdir -p "${package_path}/repos/${repository}-x86_64" + touch "${package_path}/repos/${repository}-x86_64/PKGBUILD" fi fi @@ -35,12 +38,12 @@ find_pkgbuild() { # this is not a repository of packages continue fi - eval package_path="$(printf '$repo_paths__%s' "${repo}")/$1" + eval package_path="$(printf '$repo_paths__%s' "${repo}")/${package}" if ! [ -d "${package_path}" ]; then continue fi PKGBUILD="$( - ls "${package_path}/repos/$2-"*"/PKGBUILD" 2> /dev/null | \ + ls "${package_path}/repos/${repository}-"*"/PKGBUILD" 2> /dev/null | \ tr ' ' '\n' | \ grep -v -- '-i686/PKGBUILD$' | \ grep -v -- '-\(staging\|testing\)-[^/]\+/PKGBUILD$' | \ |