From e3b9ed08b6be66ca83019cf87d62d907eb948705 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 15 Jun 2017 17:44:43 +0200 Subject: bin/common-functions: move several "eval"s to the front --- bin/common-functions | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/common-functions b/bin/common-functions index 3280f05..fe8ae42 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -10,12 +10,12 @@ find_pkgbuild() { - local PKGBUILD='' repo file + local PKGBUILD='' repo file package_path if [ -f "${repo_paths__archlinux32}/$2/$1/PKGBUILD" ]; then # If this package has some modification, repo="$(find_git_repository_to_package_repository "$2")" - local package_path="$(eval printf '$repo_paths__%s' "${repo}")/$1" + eval package_path="$(printf '$repo_paths__%s' "${repo}")/$1" if ! [ -d "${package_path}" ]; then # create some dummy files if it is also new. mkdir -p "${package_path}/repos/$2-x86_64" @@ -28,7 +28,7 @@ find_pkgbuild() { # this is not a repository of packages continue fi - local package_path="$(eval printf '$repo_paths__%s' "${repo}")/$1" + eval package_path="$(printf '$repo_paths__%s' "${repo}")/$1" if ! [ -d "${package_path}" ]; then continue fi @@ -96,7 +96,7 @@ find_repository_with_commit() { local repository for repository in ${repo_names}; do - if [ "$(git -C "$(eval printf '$repo_paths__%s' "${repository}")" cat-file -t "$1" 2> /dev/null)" = "commit" ]; then + if [ "$(eval git -C "$(printf '$repo_paths__%s' "${repository}")" cat-file -t "$1" 2> /dev/null)" = "commit" ]; then echo "${repository}" return 0 fi @@ -119,7 +119,7 @@ find_git_repository_to_package_repository() { fi if [ -n "$( ( - ls "$(eval printf '$repo_paths__%s' "${repository}")/"*"/repos" | \ + eval ls "$(printf '$repo_paths__%s' "${repository}")/"*"/repos" | \ grep -v ':$' | \ sed 's|-[^-]\+$||' | \ sort -u @@ -178,8 +178,8 @@ generate_package_metadata() { return 0 fi - git -C "$(eval printf '$repo_paths__%s' "$(find_repository_with_commit "${git_revision}")")" checkout "${git_revision}" - git -C "$(eval printf '$repo_paths__%s' "$(find_repository_with_commit "${mod_git_revision}")")" checkout "${mod_git_revision}" + eval git -C "$(printf '$repo_paths__%s' "$(find_repository_with_commit "${git_revision}")")" checkout "${git_revision}" + eval git -C "$(printf '$repo_paths__%s' "$(find_repository_with_commit "${mod_git_revision}")")" checkout "${mod_git_revision}" PKGBUILD="$(find_pkgbuild "${package}" "${repository}")" -- cgit v1.2.3-54-g00ecf