From 042cc90fad9f88e8834052441110c1dae5ffa809 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Dec 2023 01:56:46 -0300 Subject: Fix: hydractl: trac-upgrade: check for Trac installation --- share/hydractl/trac-upgrade | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/share/hydractl/trac-upgrade b/share/hydractl/trac-upgrade index 31e8f52..c5774f9 100755 --- a/share/hydractl/trac-upgrade +++ b/share/hydractl/trac-upgrade @@ -30,6 +30,15 @@ fi # Upgrade for instance in `find $BASE -maxdepth 2 -name trac`; do + # Check for Trac + # + # Do this inside the loop to avoid giving an error + # message if there's no trac instance + if ! which trac-admin &> /dev/null; then + echo "Could not find a trac-admin executable, aborting" + exit 1 + fi + ( echo "Upgrading trac instance $instance..." cd $instance -- cgit v1.2.3