basic version checking
This commit is contained in:
@@ -4,7 +4,10 @@ set -u
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="bash"
|
||||
app="bash"
|
||||
|
||||
ver_check $app $expected_version || echofail "$app $expected_version check failed."
|
||||
ver_check $real_name $app $expected_version || \
|
||||
echofail "$real_name $expected_version check failed."
|
||||
|
||||
exit $?
|
||||
|
||||
11
rex.project/x86_64/components/dependencies/binutils.bash
Executable file
11
rex.project/x86_64/components/dependencies/binutils.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="binutils"
|
||||
app="ld"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/bison.bash
Executable file
11
rex.project/x86_64/components/dependencies/bison.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="bison"
|
||||
app="bison"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
@@ -4,7 +4,8 @@ set -u
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="coreutils"
|
||||
app="sort"
|
||||
|
||||
ver_check $app $expected_version || echofail "$app $expected_version check failed."
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
|
||||
11
rex.project/x86_64/components/dependencies/diffutils.bash
Executable file
11
rex.project/x86_64/components/dependencies/diffutils.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="diffutils"
|
||||
app="diff"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/findutils.bash
Executable file
11
rex.project/x86_64/components/dependencies/findutils.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="findutils"
|
||||
app="find"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/g++.bash
Executable file
11
rex.project/x86_64/components/dependencies/g++.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="GCC (G++)"
|
||||
app="g++"
|
||||
|
||||
ver_check "$real_name" "$app" "$expected_version" || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/gawk.bash
Executable file
11
rex.project/x86_64/components/dependencies/gawk.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="gawk"
|
||||
app="gawk"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/gcc.bash
Executable file
11
rex.project/x86_64/components/dependencies/gcc.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="coreutils"
|
||||
app="sort"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/grep.bash
Executable file
11
rex.project/x86_64/components/dependencies/grep.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="grep"
|
||||
app="grep"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/gzip.bash
Executable file
11
rex.project/x86_64/components/dependencies/gzip.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="gzip"
|
||||
app="gzip"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/kernel.bash
Executable file
11
rex.project/x86_64/components/dependencies/kernel.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="coreutils"
|
||||
app="sort"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/m4.bash
Executable file
11
rex.project/x86_64/components/dependencies/m4.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="m4"
|
||||
app="m4"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/make.bash
Executable file
11
rex.project/x86_64/components/dependencies/make.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="make"
|
||||
app="make"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/patch.bash
Executable file
11
rex.project/x86_64/components/dependencies/patch.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="patch"
|
||||
app="patch"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/perl.bash
Executable file
11
rex.project/x86_64/components/dependencies/perl.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="perl"
|
||||
app="perl"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/python3.bash
Executable file
11
rex.project/x86_64/components/dependencies/python3.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="python3"
|
||||
app="python3"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
27
rex.project/x86_64/components/dependencies/rectify_bison.bash
Executable file
27
rex.project/x86_64/components/dependencies/rectify_bison.bash
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
real_name="bison"
|
||||
app="bison"
|
||||
|
||||
dialog \
|
||||
--title "Install ${real_name}?" \
|
||||
--backtitle "Requirements Remediations" \
|
||||
--yesno "Do you want to install ${real_name} on the build host?" 7 60
|
||||
|
||||
response=$?
|
||||
|
||||
# this is distro-specific and distro-specific function routing should
|
||||
# account for things like this
|
||||
|
||||
case $response in
|
||||
0) dnf -y install $app; install_result=$?;;
|
||||
1) echo "Canceled. You need $real_name to run this.";;
|
||||
255) echo "Canceled. You need $real_name to run this.";;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
exit $install_result
|
||||
27
rex.project/x86_64/components/dependencies/rectify_patch.bash
Executable file
27
rex.project/x86_64/components/dependencies/rectify_patch.bash
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
real_name="patch"
|
||||
app="patch"
|
||||
|
||||
dialog \
|
||||
--title "Install ${real_name}?" \
|
||||
--backtitle "Requirements Remediations" \
|
||||
--yesno "Do you want to install ${real_name} on the build host?" 7 60
|
||||
|
||||
response=$?
|
||||
|
||||
# this is distro-specific and distro-specific function routing should
|
||||
# account for things like this
|
||||
|
||||
case $response in
|
||||
0) dnf -y install $app; install_result=$?;;
|
||||
1) echo "Canceled. You need $real_name to run this.";;
|
||||
255) echo "Canceled. You need $real_name to run this.";;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
exit $install_result
|
||||
27
rex.project/x86_64/components/dependencies/rectify_texinfo.bash
Executable file
27
rex.project/x86_64/components/dependencies/rectify_texinfo.bash
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
real_name="texinfo"
|
||||
app="texinfo"
|
||||
|
||||
dialog \
|
||||
--title "Install ${real_name}?" \
|
||||
--backtitle "Requirements Remediations" \
|
||||
--yesno "Do you want to install ${real_name} on the build host?" 7 60
|
||||
|
||||
response=$?
|
||||
|
||||
# this is distro-specific and distro-specific function routing should
|
||||
# account for things like this
|
||||
|
||||
case $response in
|
||||
0) dnf -y install $app; install_result=$?;;
|
||||
1) echo "Canceled. You need $real_name to run this.";;
|
||||
255) echo "Canceled. You need $real_name to run this.";;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
exit $install_result
|
||||
11
rex.project/x86_64/components/dependencies/sed.bash
Executable file
11
rex.project/x86_64/components/dependencies/sed.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="sed"
|
||||
app="sed"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/tar.bash
Executable file
11
rex.project/x86_64/components/dependencies/tar.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="tar"
|
||||
app="tar"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/texinfo.bash
Executable file
11
rex.project/x86_64/components/dependencies/texinfo.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="texinfo"
|
||||
app="texi2any"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
11
rex.project/x86_64/components/dependencies/xz.bash
Executable file
11
rex.project/x86_64/components/dependencies/xz.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
expected_version="$1"
|
||||
real_name="xz"
|
||||
app="xz"
|
||||
|
||||
ver_check $real_name $app $expected_version || echofail "$real_name $expected_version check failed."
|
||||
exit $?
|
||||
Reference in New Issue
Block a user