File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,10 +318,12 @@ for ((i=0; i < NSOURCES; i++)); do
318318 DNLOAD=$( echo " ${SOURCE_INFO_PROCESSED[i]} " | cut -f 5 -d ' :' )
319319
320320 if [ $DALL -eq 1 -o " x${DNLOAD} " == " xy" ]; then
321- if ! DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " https://${REPO} " " ${TAG} " " ${OPT} " ; then
321+ if DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git://${REPO} " " ${TAG} " " ${OPT} " ; then
322+ true
323+ else
322324 if [[ $? == 1 ]]; then
323- echo " Trying git protocol"
324- DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git ://${REPO} " " ${TAG} " " ${OPT} "
325+ echo " Trying https protocol"
326+ DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " https ://${REPO} " " ${TAG} " " ${OPT} "
325327 fi
326328 fi
327329 fi
Original file line number Diff line number Diff line change @@ -328,11 +328,13 @@ for ((i=0; i < NSOURCES; i++)); do
328328 DNLOAD=$( echo " ${SOURCE_INFO_PROCESSED[i]} " | cut -f 5 -d ' :' )
329329
330330 if [ $DALL -eq 1 -o " x${DNLOAD} " == " xy" ]; then
331- DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git://${REPO} " " ${TAG} " " ${OPT} "
332- tRET=$?
333- let GRET=GRET+tRET
334- if [ $tRET -ne 0 -a $EOE -eq 1 ]; then
335- exit $tRET
331+ if DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git://${REPO} " " ${TAG} " " ${OPT} " ; then
332+ true
333+ else
334+ if [[ $? == 1 ]]; then
335+ echo " Trying https protocol"
336+ DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " https://${REPO} " " ${TAG} " " ${OPT} "
337+ fi
336338 fi
337339 fi
338340done
Original file line number Diff line number Diff line change @@ -341,11 +341,13 @@ for ((i=0; i < NSOURCES; i++)); do
341341 DNLOAD=$( echo " ${SOURCE_INFO_PROCESSED[i]} " | cut -f 5 -d ' :' )
342342
343343 if [ $DALL -eq 1 -o " x${DNLOAD} " == " xy" ]; then
344- DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git://${REPO} " " ${TAG} " " ${OPT} "
345- tRET=$?
346- let GRET=GRET+tRET
347- if [ $tRET -ne 0 -a $EOE -eq 1 ]; then
348- exit $tRET
344+ if DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git://${REPO} " " ${TAG} " " ${OPT} " ; then
345+ true
346+ else
347+ if [[ $? == 1 ]]; then
348+ echo " Trying https protocol"
349+ DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " https://${REPO} " " ${TAG} " " ${OPT} "
350+ fi
349351 fi
350352 fi
351353done
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ function DownloadAndSync {
188188 git fetch --all 2>&1 > /dev/null
189189 popd > /dev/null
190190 else
191- echo " Downloading default $WHAT source3 ..."
191+ echo " Downloading default $WHAT source ..."
192192
193193 if ! git clone " $REPO_URL " -n ${LDK_SOURCE_DIR} > /dev/null; then
194194 echo " $2 source sync failed"
@@ -318,11 +318,13 @@ for ((i=0; i < NSOURCES; i++)); do
318318 DNLOAD=$( echo " ${SOURCE_INFO_PROCESSED[i]} " | cut -f 5 -d ' :' )
319319
320320 if [ $DALL -eq 1 -o " x${DNLOAD} " == " xy" ]; then
321- DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git://${REPO} " " ${TAG} " " ${OPT} "
322- tRET=$?
323- let GRET=GRET+tRET
324- if [ $tRET -ne 0 -a $EOE -eq 1 ]; then
325- exit $tRET
321+ if DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " git://${REPO} " " ${TAG} " " ${OPT} " ; then
322+ true
323+ else
324+ if [[ $? == 1 ]]; then
325+ echo " Trying https protocol"
326+ DownloadAndSync " $WHAT " " ${LDK_DIR} /${WHAT} " " https://${REPO} " " ${TAG} " " ${OPT} "
327+ fi
326328 fi
327329 fi
328330done
You can’t perform that action at this time.
0 commit comments