@@ -12,11 +12,14 @@ umask 022
12
12
# wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
13
13
# sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
14
14
# sudo apt-get update && sudo apt-get install adoptopenjdk-8-hotspot
15
-
15
+ #
16
+ # For Fedora 36-ish distros:
17
+ # # Prep yum repository from https://adoptium.net/installation/linux/
18
+ # sudo dnf install -y ant temurin-8-jdk
19
+ # export JAVA_HOME=/usr/lib/jvm/temurin-8-jdk
16
20
17
21
sinfo () { echo " $@ " >&2 ; }
18
22
shead () { sinfo " " ; sinfo " ---------------------------------" ; sinfo " -- $@ " ; sinfo " ---------------------------------" ; }
19
- havecmd () { command command type " ${1} " > /dev/null 2>&1 || return 1 ; }
20
23
21
24
this_script=" $( realpath " ${BASH_SOURCE[0]} " ) "
22
25
script_dir=" $( realpath " $( dirname " $this_script " ) " ) "
@@ -31,7 +34,7 @@ build_fmpp() {
31
34
|| { mkdir " $script_dir /fmpp" && tar xf " $script_dir /fmpp.tar.gz" -C " $script_dir /fmpp" --strip-components=1 ; }
32
35
pushd " $script_dir /fmpp" > /dev/null 2>&1
33
36
sed -e " s#bootclasspath.path=.*#bootclasspath.path=$( find /usr/lib/jvm -name ' rt.jar' | sort | tail -n1) #g" \
34
- -e " s#ant.jar.path=.*#ant.jar.path=$( find /usr/share/java -name ' ant-1*.jar' | sort | tail -n1) #g" \
37
+ -e " s#ant.jar.path=.*#ant.jar.path=$( find /usr/share/java -name ' ant-1*.jar' -or -name ' ant.jar ' | sort | tail -n1) #g" \
35
38
build.properties.sample > build.properties
36
39
sed -e ' s#source="1.5"#source="1.8"#g' \
37
40
-e ' s#target="1.5"#target="1.8"#g' \
@@ -98,7 +101,8 @@ upgrade_mcuconf_files() {
98
101
popd > /dev/null 2>&1
99
102
}
100
103
101
- havecmd fmpp || build_fmpp
104
+ hash -r
105
+ [[ -n " $( which fmpp 2> /dev/null) " ]] || build_fmpp
102
106
103
107
upgrade_mcuconf_files
104
108
upgrade_chconf_files
0 commit comments