From d46a2c6057a4d92bd196410ac4bcc58eabb55ef1 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Wed, 13 Jul 2022 18:44:00 +0300 Subject: [PATCH] Use valid tor_root also for tor_install() --- install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index e0cffb9..a6c4150 100755 --- a/install.sh +++ b/install.sh @@ -351,15 +351,19 @@ libsodium_install () popd } -tor_build () +tor_root () { # jm_root will be empty for --docker-install, # sys.prefix defaults to /usr/local if [[ -n "$jm_root" ]]; then - tor_root="$jm_root" + echo "$jm_root" else - tor_root="/usr/local" + echo "/usr/local" fi +} + +tor_build () +{ $make uninstall $make distclean ./configure \ @@ -372,7 +376,7 @@ tor_build () --disable-asciidoc \ --disable-manpage \ --disable-html-manual \ - --prefix="${tor_root}" + --prefix="$(tor_root)" $make if ! $make check; then return 1 @@ -397,7 +401,7 @@ Log warn stderr SOCKSPort 9050 IsolateDestAddr IsolateDestPort ControlPort 9051 CookieAuthentication 1 - " > "${jm_root}/etc/tor/torrc" + " > "$(tor_root)/etc/tor/torrc" else return 1 fi