From fc0e5942ab8a3340bd80f4a788f26bb261a078f6 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Tue, 6 Oct 2015 01:36:12 -0500 Subject: Fixing symlinks to db-sync-arm --- db-sync-arm | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/db-sync-arm b/db-sync-arm index ff88c93..952b546 100755 --- a/db-sync-arm +++ b/db-sync-arm @@ -140,7 +140,6 @@ init() { for _repo in "${ARMREPOS[@]}"; do # Modify whitelist to search packages and create symlinks sed -i "s/*/-${_arch}.pkg.tar.xz/g" "/tmp/${_repo}-${_arch}.whitelist" - cp "/tmp/${_repo}-${_arch}.whitelist" "/tmp/${_repo}-any.whitelist" msg "Putting symlinks in ${_repo}/os/${_arch}" @@ -149,40 +148,20 @@ init() { if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}" ]; then ln -sfv "../../../${PKGPOOLARM}/${_pkgfile}" \ "${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}" - - # Delete entry to "any" whitelist - sed -i "s/${_pkgfile}//g" "/tmp/${_repo}-any.whitelist" + elif [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile/${_arch}/any}" ]; then + ln -sfv "../../../${PKGPOOLARM}/${_pkgfile/${_arch}/any}" \ + "${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile/${_arch}/any}" fi # Symlink to signature if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}.sig" ]; then ln -sfv "../../../${PKGPOOLARM}/${_pkgfile}.sig" \ "${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}.sig" - - # Delete entry to "any" whitelist - sed -i "s/${_pkgfile}//g" "/tmp/${_repo}-any.whitelist" + elif [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile/${_arch}/any}.sig" ]; then + ln -sfv "../../../${PKGPOOLARM}/${_pkgfile/${_arch}/any}.sig" \ + "${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile/${_arch}/any}.sig" fi done < "/tmp/${_repo}-${_arch}.whitelist" - - msg "Putting symlinks to packages with arch 'any' in ${_repo}/os/${_arch}" - - # Modify whitelist to search "any" packages and create symlinks - sed -i "s/-${_arch}./-any./g" "/tmp/${_repo}-any.whitelist" - sed -i '/^$/d' "/tmp/${_repo}-any.whitelist" - - while read _pkgfile; do - # Symlink to package - if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}" ]; then - ln -sfv "../../../${PKGPOOLARM}/${_pkgfile}" \ - "${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}" - fi - - # Symlink to signature - if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}.sig" ]; then - ln -sfv "../../../${PKGPOOLARM}/${_pkgfile}.sig" \ - "${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}.sig" - fi - done < "/tmp/${_repo}-any.whitelist" done done -- cgit v1.2.3