From a1f81258c164e772307043cf1be65c1343319d58 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 5 May 2025 15:11:14 -0400 Subject: 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) --- configure.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'configure.sh') 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 <config.mk PREFIX=$PREFIX -TOMO_HOME=$TOMO_HOME DEFAULT_C_COMPILER=$DEFAULT_C_COMPILER +SUDO=$SUDO END -- cgit v1.2.3