Skip to content

Commit fd86b26

Browse files
committed
Only disable curl SSL cert checking for digilent. launchpad (gcc-arm)
complained if it was disabled.
1 parent 3d84c02 commit fd86b26

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

script/bootstrap.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ else
2727
source $SCRIPTS_DIR/bootstrap/pic32.sh
2828
source $SCRIPTS_DIR/bootstrap/devel.sh;
2929
fi
30+
31+
echo "Bootstrap complete"

script/bootstrap/common.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,16 @@ if [ -z $COMMON_SOURCED ]; then
113113
download() {
114114
url=$1
115115
filename=$2
116-
# Disabling SSL cert checking (-k), which while strong discouraged, is
117-
# used here because some dependency hosts CA bundle files are messed up,
118-
# and this software doesn't store any secure data. If Digilent fixes
119-
# their SSL certificate bundle we can remove it.
120-
curl -k $url -L -o $filename
116+
117+
#if 3rd arg exists, run curl and disable SSL cert checking. Added
118+
#for digilent - see pic32.sh
119+
if [ ! -z $3 ]; then
120+
k_opt="-k"
121+
else
122+
k_opt=""
123+
fi
124+
echo "download() running 'curl $k_opt $url -L -o $filename'"
125+
curl $k_opt $url -L -o $filename
121126
}
122127

123128
if [ `id -u` == 0 ]; then

script/bootstrap/pic32.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ source $BOOTSTRAP_DIR/flashing_chipkit.sh
99
## chipKIT libraries for USB, CAN and Network
1010

1111
CHIPKIT_LIBRARY_AGREEMENT_URL="https://reference.digilentinc.com/agreement"
12+
13+
# Disabling SSL cert checking (-k), which while strong discouraged, is
14+
# used here because some dependency hosts CA bundle files are messed up,
15+
# and this software doesn't store any secure data. If Digilent fixes
16+
# their SSL certificate bundle we can remove it.
17+
NOT_SECURE="true"
1218
CHIPKIT_LIBRARY_DOWNLOAD_URL="https://reference.digilentinc.com/_media/chipkit_network_and_usb_libs-20150115.zip"
19+
1320
CHIPKIT_ZIP_FILE="chipkit_network_and_usb_libs-20150115.zip"
1421

1522
_pushd $DEPENDENCIES_FOLDER
@@ -21,7 +28,7 @@ then
2128
echo "Press Enter to verify you have read the license agreement."
2229
read
2330
fi
24-
download $CHIPKIT_LIBRARY_DOWNLOAD_URL $CHIPKIT_ZIP_FILE
31+
download $CHIPKIT_LIBRARY_DOWNLOAD_URL $CHIPKIT_ZIP_FILE $NOT_SECURE
2532
unzip $CHIPKIT_ZIP_FILE
2633
fi
2734
_popd

0 commit comments

Comments
 (0)