From 9b7d7f341a6f813001c95b746e06ed5d5fe1864b Mon Sep 17 00:00:00 2001 From: "ron.record" Date: Mon, 28 Oct 2024 07:34:34 -0700 Subject: [PATCH] Cleanup unattended install, emphasize discover message --- Install | 5 ++++- etc/postinstall | 12 ++++++++---- linInstall | 9 ++++++++- macInstall | 9 ++++++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/Install b/Install index 846208e..4883238 100755 --- a/Install +++ b/Install @@ -36,7 +36,10 @@ else } fi -[ "$1" == "unattended" ] && export ROON_UNATTENDED="unattended" +[ "$1" == "unattended" ] && { + export ROON_UNATTENDED="unattended" + shift +} [ "${iamroot}" ] && { [ "${ROON_UNATTENDED}" ] || { diff --git a/etc/postinstall b/etc/postinstall index 47b4d4f..c105022 100755 --- a/etc/postinstall +++ b/etc/postinstall @@ -240,7 +240,7 @@ if [ "${PYTHONUSERBASE}" ]; then fi . ${ROONCONF} - RVER=$(${PYTHON} -m pip show roonapi | grep Version | awk -F ':' ' { print $2 } ') + RVER=$(${PYTHON} -m pip show roonapi 2>/dev/null | grep Version | awk -F ':' ' { print $2 } ') # Remove leading and trailing spaces in RVER RVER="$(echo -e "${RVER}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" # Only patch Roonapi version 0.0.38 and earlier @@ -309,16 +309,20 @@ else fi # Install utilities used by the RoonCommandLine menu system -[ -x ${ROON}/etc/install-figlet ] && ${SUDO} ${SARG} ${SUSR} ${ROON}/etc/install-figlet -[ -x ${ROON}/etc/install-fzf ] && ${SUDO} ${SARG} ${SUSR} ${ROON}/etc/install-fzf -[ -x ${ROON}/etc/install-gum ] && ${SUDO} ${SARG} ${SUSR} ${ROON}/etc/install-gum +[ -x ${ROON}/etc/install-figlet ] && ${SUDO} ${SARG} ${SUSR} ${ROON}/etc/install-figlet 2>/dev/null +[ -x ${ROON}/etc/install-fzf ] && ${SUDO} ${SARG} ${SUSR} ${ROON}/etc/install-fzf 2>/dev/null +[ -x ${ROON}/etc/install-gum ] && ${SUDO} ${SARG} ${SUSR} ${ROON}/etc/install-gum 2>/dev/null echo "" if [ "${ROON_UNATTENDED}" ]; then + echo "" + echo "*************************** IMPORTANT ***************************" echo "Roon Core discovery and authorizing the RoonCommandLine extension" echo "must be performed post-installation in unattended installations." echo "After the installation of RoonCommandLine completes, run the command:" + echo "" echo " /usr/local/bin/roon -c discover" + echo "*****************************************************************" else ${ROON}/etc/discover "${SUDO}" "${SARG}" "${SUSR}" fi diff --git a/linInstall b/linInstall index f06c1a5..6b2586b 100755 --- a/linInstall +++ b/linInstall @@ -29,7 +29,10 @@ else } fi -[ "$1" == "unattended" ] && export ROON_UNATTENDED="unattended" +[ "$1" == "unattended" ] && { + export ROON_UNATTENDED="unattended" + shift +} BOLD=$(tput bold 2>/dev/null) NORMAL=$(tput sgr0 2>/dev/null) @@ -417,10 +420,14 @@ fi echo "" if [ "${ROON_UNATTENDED}" ]; then + echo "" + echo "*************************** IMPORTANT ***************************" echo "Roon Core discovery and authorizing the RoonCommandLine extension" echo "must be performed post-installation in unattended installations." echo "After the installation of RoonCommandLine completes, run the command:" + echo "" echo " /usr/local/bin/roon -c discover" + echo "*****************************************************************" else ${ROON}/etc/discover "${SUDO}" "${SARG}" "${SUSR}" fi diff --git a/macInstall b/macInstall index 1757c90..cd374c6 100755 --- a/macInstall +++ b/macInstall @@ -27,7 +27,10 @@ else } fi -[ "$1" == "unattended" ] && export ROON_UNATTENDED="unattended" +[ "$1" == "unattended" ] && { + export ROON_UNATTENDED="unattended" + shift +} BOLD=$(tput bold 2>/dev/null) NORMAL=$(tput sgr0 2>/dev/null) @@ -445,10 +448,14 @@ fi echo "" if [ "${ROON_UNATTENDED}" ]; then + echo "" + echo "*************************** IMPORTANT ***************************" echo "Roon Core discovery and authorizing the RoonCommandLine extension" echo "must be performed post-installation in unattended installations." echo "After the installation of RoonCommandLine completes, run the command:" + echo "" echo " /usr/local/bin/roon -c discover" + echo "*****************************************************************" else ${ROON}/etc/discover "${SUDO}" "${SARG}" "${SUSR}" fi