File tree Expand file tree Collapse file tree 2 files changed +20
-11
lines changed
prerequisites/build-functions Expand file tree Collapse file tree 2 files changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,14 @@ download_if_necessary()
44
44
elif [[ " ${fetch} " == " git" ]]; then
45
45
args=" clone"
46
46
elif [[ " ${fetch} " == " curl" ]]; then
47
- args=" -LO"
47
+ first_three_characters=$( echo " ${package_url} " | cut -c1-3)
48
+ if [[ " ${first_three_characters} " == " ftp" ]]; then
49
+ args=" -LO -u anonymous:"
50
+ elif [[ " ${first_three_characters} " == " htt" ]]; then
51
+ args=" -LO"
52
+ else
53
+ emergency " download_if_necessary.sh: Unrecognized URL."
54
+ fi
48
55
fi
49
56
50
57
if [[ " ${fetch} " == " svn" || " ${fetch} " == " git" ]]; then
Original file line number Diff line number Diff line change @@ -13,29 +13,31 @@ set_or_print_downloader()
13
13
${OPENCOARRAYS_SRC_DIR} /prerequisites/install-ofp.sh " ${@ } "
14
14
exit 0
15
15
fi
16
- if [[ " ${package_name} " == " gcc" && " ${version_to_build} " != " trunk" ]]; then
17
- gcc_fetch=" ftp-url"
18
- else
19
- gcc_fetch=" svn"
20
- fi
21
16
if [[ $( uname) == " Darwin" ]]; then
22
17
wget_or_curl=curl
18
+ ftp_or_curl=curl
23
19
else
24
20
wget_or_curl=wget
21
+ ftp_or_curl=ftp-url
22
+ fi
23
+ if [[ " ${package_name} " == " gcc" && " ${version_to_build} " != " trunk" ]]; then
24
+ gcc_fetch=" ${ftp_or_curl} "
25
+ else
26
+ gcc_fetch=" svn"
25
27
fi
26
28
# This is a bash 3 hack standing in for a bash 4 hash (bash 3 is the lowest common
27
29
# denominator because, for licensing reasons, OS X only has bash 3 by default.)
28
30
# See http://stackoverflow.com/questions/1494178/how-to-define-hash-tables-in-bash
29
31
package_fetch=(
30
- " gcc:$gcc_fetch "
31
- " wget:ftp-url "
32
+ " gcc:${ gcc_fetch} "
33
+ " wget:${ftp_or_curl} "
32
34
" cmake:${wget_or_curl} "
33
35
" mpich:${wget_or_curl} "
34
36
" flex:${wget_or_curl} "
35
- " bison:ftp-url "
37
+ " bison:${ftp_or_curl} "
36
38
" pkg-config:${wget_or_curl} "
37
- " make:ftp-url "
38
- " m4:ftp-url "
39
+ " make:${ftp_or_curl} "
40
+ " m4:${ftp_or_curl} "
39
41
" subversion:${wget_or_curl} "
40
42
)
41
43
for package in " ${package_fetch[@]} " ; do
You can’t perform that action at this time.
0 commit comments