Skip to content

Commit 5a66338

Browse files
author
Damian Rouson
committed
git clone gcc branches (remove all use of svn)
1 parent 52b1dd3 commit 5a66338

File tree

4 files changed

+11
-25
lines changed

4 files changed

+11
-25
lines changed

prerequisites/build-functions/download_if_necessary.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,8 @@ download_if_necessary()
2222
args=("-n")
2323
;;
2424
"git" )
25-
args=("clone")
25+
args=("clone" "-b" "${arg_b}")
2626
;;
27-
"svn" )
28-
case "${arg_B:-}" in
29-
"gcc")
30-
args=("ls")
31-
;;
32-
*)
33-
args=("checkout")
34-
;;
35-
esac
36-
;;
3727
"curl" )
3828
first_three_characters=$(echo "${package_url}" | cut -c1-3)
3929
case "${first_three_characters}" in
@@ -95,7 +85,7 @@ download_if_necessary()
9585
emergency "Aborting [exit 90]"
9686
else
9787

98-
if [[ "${fetch}" == "svn" || "${fetch}" == "git" ]]; then
88+
if [[ "${fetch}" == "git" ]]; then
9989
package_source_directory="${url_tail}"
10090
else
10191
package_source_directory="${package_name}-${version_to_build}"
@@ -110,7 +100,7 @@ download_if_necessary()
110100
if [[ ! -z "${arg_B:-}" ]]; then
111101
return
112102
else
113-
if [[ "${fetch}" == "svn" ]]; then
103+
if [[ "${fetch}" == "git" ]]; then
114104
search_path="${download_path}/${version_to_build}"
115105
else
116106
search_path="${download_path}/${url_tail}"

prerequisites/build-functions/set_or_print_downloader.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set_or_print_downloader()
1717
fi
1818

1919
# Choose the first available download mechanism, prioritizing first any absolute requirement
20-
# (svn for gcc development branches) and second robustness:
20+
# (git for gcc development branches) and second robustness:
2121
info "Checking available download mechanisms: ftp, wget, and curl."
2222
info "\${package_name}=${package_name} \${arg_b:-\${arg_B:-}}=${arg_b:-${arg_B:-}}"
2323

@@ -35,10 +35,10 @@ set_or_print_downloader()
3535
fi
3636

3737
if [[ "${package_name}" == "gcc" && ! -z "${arg_b:-${arg_B:-}}" ]]; then
38-
if type svn &> /dev/null; then
39-
fetch=svn
38+
if type git &> /dev/null; then
39+
fetch=git
4040
else
41-
tried="svn"
41+
tried="git"
4242
fi
4343
else
4444
fetch=${gcc_prereqs_fetch}

prerequisites/build-functions/set_or_print_url.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else
2323
if [[ -z "${arg_b:-${arg_B}}" ]]; then
2424
gcc_url_head="https://ftpmirror.gnu.org/gcc/gcc-${version_to_build}/"
2525
else
26-
gcc_url_head="svn://gcc.gnu.org/svn/gcc/"
26+
gcc_url_head="git://gcc.gnu.org/git/"
2727
fi
2828
fi
2929
package_url_head=(
@@ -52,12 +52,8 @@ else
5252

5353
# Set differing tails for GCC release downloads versus development branch checkouts
5454
if [[ "${package_to_build}" == 'gcc' ]]; then
55-
if [[ "${fetch}" == 'svn' ]]; then
56-
if [[ "${version_to_build:-}" == "trunk" ]]; then
57-
gcc_tail="${version_to_build}"
58-
else
59-
gcc_tail="branches/${version_to_build:-}"
60-
fi
55+
if [[ "${fetch}" == 'git' ]]; then
56+
gcc_tail="gcc.git"
6157
else
6258
gcc_tail="gcc-${version_to_build}.tar.gz"
6359
fi

prerequisites/build-functions/unpack_if_necessary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# shellcheck disable=SC2154
33
unpack_if_necessary()
44
{
5-
if [[ "${fetch}" == "svn" || "${fetch}" == "git" ]]; then
5+
if [[ "${fetch}" == "git" ]]; then
66
package_source_directory="${version_to_build}"
77
else
88
if [[ "${url_tail}" == *tar.gz || "${url_tail}" == *tar.bz2 || "${url_tail}" == *.tar.xz ]]; then

0 commit comments

Comments
 (0)