File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,20 @@ function usage()
1515
1616patch_file=" ${1} "
1717
18+ function set_absolute_path()
19+ {
20+ : " ${1?' set_absolute_path: no argument provided' } "
21+
22+ arg=${1}
23+ first_character=$( echo " ${arg} " | cut -c1-1)
24+ if [[ " ${first_character} " == " /" ]]; then
25+ absolute_path=" ${arg} "
26+ else
27+ absolute_path=" ${PWD%%/ }${arg} "
28+ fi
29+ }
30+ set_absolute_path " ${patch_file} "
31+
1832# Exit on error or use of an unset variable:
1933set -o errexit
2034set -o nounset
@@ -106,12 +120,13 @@ install_if_missing flex
106120# ## Install the prerequisites that must be built from source ###
107121
108122# Download and build the GCC trunk:
109- ./install.sh --package gcc --install-branch trunk --only-download
123+ echo " Downloading the GCC trunk."
124+ ./install.sh --only-download --package gcc --install-branch trunk
110125
111126# Patch the GCC trunk and rebuild
112- echo " Patching the GCC source."
127+ echo " Patching the GCC source using ${absolute_path} ."
113128pushd prerequisites/downloads/trunk
114- patch -p0 < " ${patch_file } "
129+ patch -p0 < " ${absolute_path } "
115130popd
116131
117132# Build the patched GCC trunk
You can’t perform that action at this time.
0 commit comments