diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-05-05 15:11:14 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-05-05 15:11:14 -0400 |
| commit | a1f81258c164e772307043cf1be65c1343319d58 (patch) | |
| tree | 270a3ab316010ad625d13119c5f9556627cd42d7 /configure.sh | |
| parent | 0df984c4b2ec7cdc683b452ffea068c220470405 (diff) | |
Fix some permission stuff to make it more seamless to install to
directories the user doesn't own (e.g. /usr/local, owned by root)
Diffstat (limited to 'configure.sh')
| -rwxr-xr-x | configure.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/configure.sh b/configure.sh index b89a31f6..1b5bd272 100755 --- a/configure.sh +++ b/configure.sh @@ -25,11 +25,11 @@ if ! echo "$PATH" | tr ':' '\n' | grep -qx "$PREFIX/bin"; then "Please put this in your .profile or .bashrc: export PATH=\"$PREFIX/bin:\$PATH\"" fi -default_home="~/.local/share/tomo" -printf '\033[1mChoose where to install Tomo libraries (default: %s):\033[m ' "$default_home" -read TOMO_HOME -if [ -z "$TOMO_HOME" ]; then TOMO_HOME="$default_home"; fi -TOMO_HOME="${TOMO_HOME/#\~/$HOME}" +if command -v doas >/dev/null; then + SUDO=doas +else + SUDO=sudo +fi default_cc="cc" printf '\033[1mChoose which C compiler to use by default (default: %s):\033[m ' "$default_cc" @@ -39,6 +39,6 @@ DEFAULT_C_COMPILER="${DEFAULT_C_COMPILER/#\~/$HOME}" cat <<END >config.mk PREFIX=$PREFIX -TOMO_HOME=$TOMO_HOME DEFAULT_C_COMPILER=$DEFAULT_C_COMPILER +SUDO=$SUDO END |
