Skip to content

Commit 63ca0e6

Browse files
committed
Merge branch 'topic/setup'
* topic/setup: Update xquartz to 2.8.3. Do not require valid certs when downloading.
2 parents fc62de1 + 0d855ae commit 63ca0e6

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

srcinstaller/Install Fink.tool

+19-11
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ DarwinVersion="$(uname -r | cut -d. -f1)"
1212
XcodeURL="macappstore://itunes.apple.com/us/app/xcode/id497799835?mt=12"
1313

1414
# Starting with 10.15 we do not use /sw due to SIP.
15-
if [ "${DarwinVersion}" -le "18" ]; then
15+
if [ "${DarwinVersion}" -le "18" ]; then
1616
FinkPrefix="/sw"
1717
else
1818
FinkPrefix="/opt/sw"
1919
fi
2020

21+
# Check if we may have a problem with certs
22+
if [ "${DarwinVersion}" -le "17" ]; then
23+
OldCerts="true"
24+
fi
25+
2126
# Java site: https://jdk.java.net/
2227
Jvers="1.6"
2328
JavaVersion="15.0.2"
@@ -34,10 +39,10 @@ FinkDirectorY="${FinkOutDir}-${FinkVersion}"
3439
FinkFileName="${FinkDirectorY}.tar.gz"
3540
FinkSourceDLP="https://downloads.sourceforge.net/project/fink/fink/${FinkVersion}/${FinkFileName}"
3641

37-
XQuartzVersion="2.8.2"
38-
XQuartzMD5Sum="4282e404cf1a59ffda2fcbfbfcfde7f0"
39-
XQuartzPKGPath="XQuartz.pkg"
40-
XQuartzFileName="XQuartz-${XQuartzVersion}.dmg"
42+
XQuartzVersion="2.8.3"
43+
XQuartzMD5Sum="e46f28b5cbb85a41a56f0e8d82f1fdfb"
44+
XQuartzFileName="XQuartz-${XQuartzVersion}.pkg"
45+
XQuartzPKGPath="${XQuartzFileName}"
4146
XQuartzSourceDLP="https://github.com/XQuartz/XQuartz/releases/download/XQuartz-${XQuartzVersion}/${XQuartzFileName}"
4247

4348

@@ -48,6 +53,12 @@ function fetchBin {
4853
local FileName="$3"
4954
local DirectorY="$4"
5055
local OutDir="$5"
56+
local CurlOpt="$6"
57+
58+
if [ "${OldCerts}" = "true" ]; then
59+
CurlOpt="-k"
60+
fi
61+
5162

5263
# Checks
5364
if [[ -d "${OutDir}" ]] && [[ -f "${FileName}" ]]; then
@@ -75,7 +86,7 @@ function fetchBin {
7586
# Fetch
7687
if [ ! -r "${FileName}" ]; then
7788
echo "Fetching ${SourceDLP}"
78-
if ! curl -Lfo "${FileName}" --connect-timeout "30" -H 'referer:' -A "fink/${FinkVersion}" "${SourceDLP}"; then
89+
if ! curl -Lfo "${FileName}" ${CurlOpt} --connect-timeout "30" -H 'referer:' -A "fink/${FinkVersion}" "${SourceDLP}"; then
7990
echo "error: Unable to fetch ${SourceDLP}" >&2
8091
exit 1
8192
fi
@@ -105,7 +116,7 @@ function fetchBin {
105116
echo "error: Unpacking ${FileName} failed" >&2
106117
exit 1
107118
fi
108-
elif [ "${ExtensioN}" = "dmg" ]; then
119+
elif [ "${ExtensioN}" = "dmg" ] || [ "${ExtensioN}" = "pkg" ]; then
109120
return
110121
else
111122
echo "error: Unable to unpack ${FileName}" >&2
@@ -225,11 +236,8 @@ echo "Checking for XQuartz..." >&2
225236
if ! pkgutil --pkg-info=org.xquartz.X11; then
226237
echo "XQuartz is not installed, fetching..." >&2
227238
fetchBin "${XQuartzMD5Sum}" "${XQuartzSourceDLP}" "${XQuartzFileName}" "-" "-"
228-
echo "Mounting the XQuartz disk..." >&2
229-
hdiutilOut="$(hdiutil mount "${XQuartzFileName}" 2>/dev/null | tr -d "\t" | grep -F '/dev/disk' | grep -Fv 'GUID_partition_scheme')"
230-
XQuartzVolPath="$(echo "${hdiutilOut}" | sed -E 's:(/dev/disk[0-9])(s[0-9])?( +)?(Apple_HFS)?( +)::')"
231239
echo "Starting the XQuartz install; please rerun this script when it finishes." >&2
232-
open "${XQuartzVolPath}/${XQuartzPKGPath}"
240+
open "${XQuartzPKGPath}"
233241
exit 0
234242
fi
235243

0 commit comments

Comments
 (0)