summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-10-06 01:36:12 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-10-06 01:36:12 -0500
commitfc0e5942ab8a3340bd80f4a788f26bb261a078f6 (patch)
treeba135a408c73223dcc07665d26f2e1e64cc180ca
parent70e08c0826ea4736e767f835da15c1daf8c0f81b (diff)
Fixing symlinks to db-sync-arm
-rwxr-xr-xdb-sync-arm33
1 files 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