rectifiers for some deps

This commit is contained in:
Chris Punches
2024-02-10 12:37:46 -05:00
parent c0ef3d4bf6
commit 8e19ee2c68
8 changed files with 160 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -u
export LC_ALL=C
app="awk"
expected_target="gawk"
sym_check $app $expected_target
exit $?

View File

@@ -0,0 +1,34 @@
#!/bin/bash
set -u
export LC_ALL=C
app="yacc"
symlink_target="bison"
dialog \
--title "Symlink '${app}' to '${symlink_target}'?" \
--backtitle "Requirements Remediations" \
--yesno "Do you want to Symlink ${app} to ${symlink_target}?" 7 60
response=$?
# this is distro-specific and distro-specific function routing should
# account for things like this
function symlink() {
ln -vs "$(which $2)" "$(dirname $(which $2))/$1"
return $?
}
install_result=0
case $response in
0) symlink "$app" "$symlink_target"; install_result=$?;;
1) echo "Canceled. You need $app pointing to $symlink_target to run this.";;
255) echo "Canceled. You need $app pointing to $symlink_target to run this.";;
esac
exit $install_result

View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -u
export LC_ALL=C
app="sh"
expected_target="bash"
sym_check $app $expected_target
exit $?

View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -u
export LC_ALL=C
app="yacc"
expected_target="bison"
sym_check $app $expected_target
exit $?