summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdb-sync-arm30
1 files changed, 20 insertions, 10 deletions
diff --git a/db-sync-arm b/db-sync-arm
index 9653d00..0f82ea9 100755
--- a/db-sync-arm
+++ b/db-sync-arm
@@ -139,7 +139,8 @@ init() {
for _arch in "${OURARCHES[@]}"; do
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"
+ 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}"
@@ -148,31 +149,40 @@ init() {
if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}" ]; then
ln -sf "../../../${PKGPOOLARM}/${_pkgfile}" \
"${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}"
+
+ # Delete entry to "any" whitelist
+ sed -i "s/${_pkgfile}//g" "/tmp/${_repo}-any.whitelist"
fi
# Symlink to signature
if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}.sig" ]; then
ln -sf "../../../${PKGPOOLARM}/${_pkgfile}.sig" \
"${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}.sig"
+
+ # Delete entry to "any" whitelist
+ sed -i "s/${_pkgfile}//g" "/tmp/${_repo}-any.whitelist"
fi
done < "/tmp/${_repo}-${_arch}.whitelist"
- # Modify whitelist to search "any" packages and create symlinks
- sed -i "s/^/\^/g" "/tmp/${_repo}-${_arch}.whitelist"
- sed -i "s/-${_arch}./-any./g" "/tmp/${_repo}-${_arch}.whitelist"
+ msg "Putting symlinks to packages with arch 'any' in ${_repo}/os/${_arch}"
- # Putting symlinks to "any" packages
- ls "${FTP_BASE}/${PKGPOOLARM}/" | grep '\-any\.' \
- | grep -w -f "/tmp/${_repo}-${_arch}.whitelist" \
- > "/tmp/${_repo}-any.pkgwhitelist"
+ # 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 and signature
+ # Symlink to package
if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}" ]; then
ln -sf "../../../${PKGPOOLARM}/${_pkgfile}" \
"${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}"
fi
- done < "/tmp/${_repo}-any.pkgwhitelist"
+
+ # Symlink to signature
+ if [ -f "${FTP_BASE}/${PKGPOOLARM}/${_pkgfile}.sig" ]; then
+ ln -sf "../../../${PKGPOOLARM}/${_pkgfile}.sig" \
+ "${FTP_BASE}/${_repo}/os/${_arch}/${_pkgfile}.sig"
+ fi
+ done < "/tmp/${_repo}-any.whitelist"
done
done