summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Cafferata <erick@cafferata.me>2019-02-10 12:52:06 -0500
committerErick Cafferata <erick@cafferata.me>2019-02-11 17:44:45 -0500
commita5e338f5759cf7e0ffeb5fcc7709ca2d14e2f741 (patch)
tree66fb9a52172b3f20f7801f0bba1db2b821f8f2db
parent777074c5ef13d886c4ea018c2ff0059e9d93692a (diff)
downloadasp32-a5e338f5759cf7e0ffeb5fcc7709ca2d14e2f741.tar.xz
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.
-rw-r--r--package.inc.sh15
1 files 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() {