138 - fix install script for FreeBSD, add doas priv elevation
Fixes #138, adds support for doas as a sudo alternative.
Description
The warn on line 113 corrupts the sudo variable set by the script.
Here is a relevant trace (using bash -x)
++ warn 'Root permissions are required to install dependecies' [567/1926]
++ printf '%s\n' '! Root permissions are required to install dependecies'
++ elevate_priv
++ has sudo
++ command -v sudo
++ sudo -v
++ unset sudo
++ sudo=sudo
++ echo sudo
+ sudo='! Root permissions are required to install dependecies
sudo'
+ '!' Root permissions are required to install dependecies sudo pkg install -y curl wget libssh gcc dbus pkgconf
install.sh: line 295: $'\E[23m!': command not found
Removing the information line fixes the issue.
Seeing that similar information is provided in elevate_priv, the line is redundant and should be fine to remove.
elevate_priv was rewritten to assign the sudo variable and to add support for doas as a popular alternative to sudo.
Type of change
Please select relevant options.
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
138 - fix install script for FreeBSD, add doas priv elevation
Fixes #138, adds support for doas as a sudo alternative.
Description
The
warn
on line 113 corrupts thesudo
variable set by the script. Here is a relevant trace (usingbash -x
)Removing the information line fixes the issue. Seeing that similar information is provided in
elevate_priv
, the line is redundant and should be fine to remove.elevate_priv
was rewritten to assign thesudo
variable and to add support for doas as a popular alternative to sudo.Type of change
Please select relevant options.
Acceptance tests