Skip to content

Commit 9d568c3

Browse files
committed
pushpkg: optimization logic
1 parent 877d9c1 commit 9d568c3

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

pushpkg/pushpkg

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,8 @@ Options:
5656
"
5757
}
5858

59-
if [ -z $USERNAME ]; then
60-
echo -e "[!!!] Please specify a LDAP user!\n"
61-
_help_message
62-
exit 1
63-
fi
64-
65-
if [ -z $BRANCH ]; then
66-
echo -e "[!!!] Please specify a branch!\n"
59+
if [[ -z $USERNAME || -z $BRANCH ]]; then
60+
echo -e "[!!!] Please specify a LDAP user and specify a branch!\n"
6761
_help_message
6862
exit 1
6963
fi
@@ -76,7 +70,7 @@ ssh ${ARGS_SSH} ${USERNAME}@repo.aosc.io "mkdir -p /mirror/debs/pool/${BRANCH}/$
7670

7771
for i in debs/*/*; do
7872
if [ $i = "*_noarch.deb" ]; then
79-
rsync ${ARGS_RSYNC} -ignore-existing -rlOvhze ssh --progress $i ${USERNAME}@repo.aosc.io:/mirror/debs/pool/${BRANCH}/${COMPOMENT}
73+
rsync ${ARGS_RSYNC} --ignore-existing -rlOvhze ssh --progress $i ${USERNAME}@repo.aosc.io:/mirror/debs/pool/${BRANCH}/${COMPOMENT}
8074
else
8175
rsync ${ARGS_RSYNC} -rlOvhze ssh --progress $i ${USERNAME}@repo.aosc.io:/mirror/debs/pool/${BRANCH}/${COMPOMENT}
8276
fi

0 commit comments

Comments
 (0)