From a5e338f5759cf7e0ffeb5fcc7709ca2d14e2f741 Mon Sep 17 00:00:00 2001 From: Erick Cafferata Date: Sun, 10 Feb 2019 12:52:06 -0500 Subject: add arch32 support for ls-files command - new behavior will show by default the files available in the arch32 repo plus the files in upstream. - As always, to check the upstream files, add the -u option. --- package.inc.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/package.inc.sh b/package.inc.sh index f1b5797..4d74278 100644 --- a/package.inc.sh +++ b/package.inc.sh @@ -145,9 +145,20 @@ package_list_files() { subtree=repos/$repo-$OPT_ARCH fi + list_ups=$(git ls-tree -r --name-only "remotes/$remote/packages/$pkgname" "$subtree" \ + 2>/dev/null | awk -v "prefix=$subtree/" 'sub(prefix, "")') - git ls-tree -r --name-only "remotes/$remote/packages/$pkgname" "$subtree" | - awk -v "prefix=$subtree/" 'sub(prefix, "")' + if ! (( OPT_UPSTREAM )); then + local trepo list_ups list_dwn + read -r trepo _ < <(package_get_repos_with_arch "$pkgname" packages32) + if [[ $trepo ]]; then + list_dwn=$(git ls-tree -r --name-only "remotes/packages32/master" "$trepo/$pkgname" | + awk -v "prefix=$trepo/$pkgname/" 'sub(prefix, "")') + [[ $list_ups ]] && printf -v list_ups "%s\n%s" "$list_ups" "$list_dwn" \ + || printf -v list_ups "%s" "$list_dwn" + fi + fi + echo "$list_ups" | sort -u } package_patch_arch32() { -- cgit v1.2.3