Skip to content

Commit

Permalink
Generate doc for ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Nov 5, 2024
1 parent 2da6a0e commit 7caaca4
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions linux/autogenerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ echo "${l}"

#generate the walkthrough for all supported os
function generate_all() {
values=(ubuntu2004 ubuntu2204 rocky9)
values=(ubuntu2004 ubuntu2204 ubuntu2404 rocky9)
for os in "${values[@]}"; do
echo "${os}"
generate ${os}
Expand Down Expand Up @@ -47,12 +47,6 @@ if ! [[ $OS =~ "rocky" ]] ; then
fi

# install java
N=$OS
if [[ $OS =~ "ubuntu1804" ]] ; then
N="ubuntu1804"
elif [[ $OS =~ "ubuntu" ]] ; then
N="ubuntu"
fi
echo -en '\n' >> $file
echo "# install Java" >> $file
if [[ $OS =~ "rocky" ]] ; then
Expand All @@ -62,11 +56,11 @@ if [[ $OS =~ "rocky" ]] ; then
ne=$((number-1))
line=$(sed -n ''$ns','$ne'p' $dir/step01_rocky9_deps.sh)
else
number=$(sed -n '/#start-recommended/=' $dir/step01_"$N"_java_deps.sh)
number=$(sed -n '/#start-recommended/=' $dir/step01_ubuntu_java_deps.sh)
ns=$((number+1))
number=$(sed -n '/#end-recommended/=' $dir/step01_"$N"_java_deps.sh)
number=$(sed -n '/#end-recommended/=' $dir/step01_ubuntu_java_deps.sh)
ne=$((number-1))
line=$(sed -n ''$ns','$ne'p' $dir/step01_"$N"_java_deps.sh)
line=$(sed -n ''$ns','$ne'p' $dir/step01_ubuntu_java_deps.sh)
fi

# remove leading whitespace
Expand All @@ -77,9 +71,6 @@ echo -en '\n' >> $file
echo "# install dependencies" >> $file
# install dependencies
N=$OS
if [[ $OS =~ "ubuntu" ]] ; then
N="ubuntu1804"
fi

if [[ $OS =~ "rocky" ]] ; then
number=$(sed -n '/#start-general/=' $dir/step01_rocky9_deps.sh)
Expand All @@ -88,7 +79,7 @@ if [[ $OS =~ "rocky" ]] ; then
ne=$((number-1))
line=$(sed -n ''$ns','$ne'p' $dir/step01_rocky9_deps.sh)
else
line=$(sed -n '2,$p' $dir/step01_"$N"_deps.sh)
line=$(sed -n '2,$p' $dir/step01_ubuntu_deps.sh)
fi

echo "$line" >> $file
Expand Down

0 comments on commit 7caaca4

Please sign in to comment.