Skip to content

Commit 9ef42c7

Browse files
authored
Merge pull request #58 from NathanBlais/master
fix download links and file names
2 parents 92d7f1c + 0f4d9e8 commit 9ef42c7

File tree

1 file changed

+32
-35
lines changed

1 file changed

+32
-35
lines changed

XcodeLegacy.sh

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# - Chris Roueche <croueche@github>
1010
# - Kris Coppieters <zwettemaan@github>
1111
# - Nick Beadman <[email protected]> / <nbeadman@github>
12+
# - Nathan Blais <NathanBlais@github>
1213
# - Alan Staniforth <[email protected]>
1314
#
1415
# License: Creative Commons BY-NC-SA 3.0 http://creativecommons.org/licenses/by-nc-sa/3.0/
@@ -298,55 +299,51 @@ case $1 in
298299
echo "*** You should download Xcode 6.4. Login to:"
299300
echo " https://developer.apple.com/downloads/"
300301
echo "then download from:"
301-
echo " https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_6.4/Xcode_6.4.dmg"
302-
echo "or"
303-
echo " https://adcdownload.apple.com/Developer_Tools/Xcode_6.4/Xcode_6.4.dmg"
302+
echo " https://download.developer.apple.com/Developer_Tools/Xcode_6.4/Xcode_6.4.dmg"
304303
echo "and then run this script from within the same directory as the downloaded file"
305304
missingdmg=1
306305
fi
307306
if [ "$xc7" = 1 ] && [ ! -f Xcode_7.3.1.dmg ]; then
308307
echo "*** You should download Xcode 7.3.1. Login to:"
309308
echo " https://developer.apple.com/downloads/"
310309
echo "then download from:"
311-
echo " https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg"
312-
echo "or"
313-
echo " https://adcdownload.apple.com/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg"
310+
echo " https://download.developer.apple.com/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg"
314311
echo "and then run this script from within the same directory as the downloaded file"
315312
missingdmg=1
316313
fi
317-
if [ "$xc8" = 1 ]; then
318-
xcode8archive="Xcode_8.3.3.xip"
319-
validarcfound=0
320-
noarcfound=0
321-
if [ ! -f Xcode_8.3.3.xip ] && [ ! -f Xcode8.3.3.xip ]; then
322-
echo "*** You should download Xcode 8.3.3. Login to:"
323-
noarcfound=1
324-
else
325-
if [ -f Xcode8.3.3.xip ]; then
326-
pkgutil --check-signature Xcode8.3.3.xip
327-
if [ "$?" = 0 ]; then
328-
xcode8archive="Xcode8.3.3.xip"
329-
validarcfound=1
330-
fi
331-
fi
332-
if [ -f Xcode_8.3.3.xip ] && [ "$validarcfound" = 0 ]; then
314+
if [ "$xc8" = 1 ]; then
315+
xcode8archive="Xcode_8.3.3.xip"
316+
validarcfound=0
317+
noarcfound=0
318+
if [ ! -f Xcode_8.3.3.xip ] && [ ! -f Xcode8.3.3.xip ]; then
319+
echo "*** You should download Xcode 8.3.3. Login to:"
320+
noarcfound=1
321+
else
322+
if [ -f Xcode8.3.3.xip ]; then
323+
pkgutil --check-signature Xcode8.3.3.xip
324+
if [ "$?" = 0 ]; then
325+
xcode8archive="Xcode8.3.3.xip"
326+
validarcfound=1
327+
fi
328+
fi
329+
if [ -f Xcode_8.3.3.xip ] && [ "$validarcfound" = 0 ]; then
333330
pkgutil --check-signature Xcode_8.3.3.xip
334331
if [ "$?" = 0 ]; then
335332
validarcfound=1
336333
fi
337334
fi
338-
if [ "$validarcfound" = 0 ]; then
339-
echo "*** You have an old Xcode 8.3.3 archive with an expired signature"
340-
echo "You should download the updated Xcode 8.3.3 archive. Login to:"
341-
fi
342-
fi
343-
if [ "$noarcfound" = 1 ] || [ "$validarcfound" = 0 ]; then
344-
echo " https://developer.apple.com/downloads/"
345-
echo "then download from:"
346-
echo " https://download.developer.apple.com/Developer_Tools/Xcode_8.3.3/Xcode_8.3.3.xip"
347-
echo "and then run this script from within the same directory as the downloaded file"
348-
missingdmg=1
349-
fi
335+
if [ "$validarcfound" = 0 ]; then
336+
echo "*** You have an old Xcode 8.3.3 archive with an expired signature"
337+
echo "You should download the updated Xcode 8.3.3 archive. Login to:"
338+
fi
339+
fi
340+
if [ "$noarcfound" = 1 ] || [ "$validarcfound" = 0 ]; then
341+
echo " https://developer.apple.com/downloads/"
342+
echo "then download from:"
343+
echo " https://download.developer.apple.com/Developer_Tools/Xcode_8.3.3/Xcode_8.3.3.xip"
344+
echo "and then run this script from within the same directory as the downloaded file"
345+
missingdmg=1
346+
fi
350347
fi
351348
if [ "$xc9" = 1 ]; then
352349
validarcfound=0
@@ -599,7 +596,7 @@ EOF
599596
if [ "$xc4" = 1 ]; then
600597
hdiutil attach "$xcode4archive" "${ATTACH_OPTS[@]}"
601598
if [ ! -d "$MNTDIR/Xcode" ]; then
602-
echo "*** Error while trying to attach disk image xcode4630916281a.dmg"
599+
echo "*** Error while trying to attach disk image xcode_4.6.3.dmg"
603600
echo "Aborting"
604601
rmdir "$MNTDIR"
605602
exit

0 commit comments

Comments
 (0)