Skip to content

Commit 271e10d

Browse files
committed
pushpkg: fix the push path
1 parent 7b31e4c commit 271e10d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pushpkg/pushpkg

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,21 @@ OUTPUT_DIR="$(readlink -f debs)"
6464
find "${OUTPUT_DIR}" -maxdepth 1 -type f -delete -print
6565

6666
ssh ${ARGS_SSH} "${USERNAME}@repo.aosc.io" "mkdir -p '/mirror/debs/pool/${BRANCH}/${COMPOMENT}'"
67-
rsync -rlOvhze ssh --progress "${OUTPUT_DIR}"/* "${USERNAME}@repo.aosc.io:/mirror/debs/pool/${BRANCH}/${COMPOMENT}"
67+
68+
NOARCH_LIST_PATH=$(mktemp)
69+
NOT_NOARCH_LIST_PATH=$(mktemp)
70+
find . -name '*_noarch.deb' -print > "$NOARCH_LIST_PATH"
71+
find . -not -name '*_noarch.deb' -print > "$NOT_NOARCH_LIST_PATH"
72+
73+
for i in "$NOARCH_LIST_PATH"; do
74+
rsync ${ARGS_RSYNC} -rlOvhze ssh --progress --ignore-existing $i "${USERNAME}@repo.aosc.io:/mirror/debs/pool/${BRANCH}/${COMPOMENT}/$(basename $(dirname $i)/"
75+
done
76+
77+
for i in "$NOT_NOARCH_LIST_PATH"; do
78+
rsync ${ARGS_RSYNC} -rlOvhze ssh --progress $i "${USERNAME}@repo.aosc.io:/mirror/debs/pool/${BRANCH}/${COMPOMENT}/$(basename $(dirname $i)/"
79+
done
80+
81+
rm -v "$NOARCH_LIST_PATH" "$NOT_NOARCH_LIST_PATH"
6882
6983
if [ $AFTER_CLEAN_DIRECTORY = 1 ]; then
7084
sudo rm -rv "$(pwd)/debs"

0 commit comments

Comments
 (0)