File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,39 @@ DIST_PATH="$ROOT_PATH/dist/default"
2323export LIBLINK_PATH=" $BUILD_PATH /objects"
2424export LIBLINK=" $ROOT_PATH /src/tools/liblink"
2525export BIGLINK=" $ROOT_PATH /src/tools/biglink"
26+
2627MD5SUM=$( which md5sum)
2728if [ " X$MD5SUM " == " X" ]; then
28- MD5SUM=" md5 -r"
29+ MD5SUM=$( which md5)
30+ if [ " X$MD5SUM " == " X" ]; then
31+ echo " Error: you need at least md5sum or md5 installed."
32+ exit 1
33+ else
34+ MD5SUM=" $MD5SUM -r"
35+ fi
2936fi
3037
38+ WGET=$( which wget)
39+ if [ " X$WGET " == " X" ]; then
40+ WGET=$( which curl)
41+ if [ " X$WGET " == " X" ]; then
42+ echo " Error: you need at least wget or curl installed."
43+ exit 1
44+ else
45+ WGET=" $WGET -L -O"
46+ fi
47+ fi
48+
49+ case $OSTYPE in
50+ darwin* )
51+ SED=" sed -i ''"
52+ ;;
53+ * )
54+ SED=" sed -i"
55+ ;;
56+ esac
57+
58+
3159# Internals
3260CRED=" \x1b[31;01m"
3361CBLUE=" \x1b[34;01m"
@@ -397,7 +425,7 @@ function run_get_packages() {
397425 # download if needed
398426 if [ $do_download -eq 1 ]; then
399427 info " Downloading $url "
400- try wget $url
428+ try $WGET $url
401429 else
402430 debug " Module $module already downloaded"
403431 fi
You can’t perform that action at this time.
0 commit comments