From 20383ef63286d43be3900048a3e68a325de429a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Tue, 6 Feb 2018 22:40:29 +0100 Subject: [PATCH] Better handling of missing upgrade scripts --- package/usr/local/bin/hassbian-config | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/usr/local/bin/hassbian-config b/package/usr/local/bin/hassbian-config index aa10b1c7..b174980a 100755 --- a/package/usr/local/bin/hassbian-config +++ b/package/usr/local/bin/hassbian-config @@ -103,6 +103,13 @@ function install-suite { function upgrade-suite { # Having got here, the installer script exists; source it, then run the installer function. + UPGRADE=$(cat $SUITE_INSTALL_DIR/$1.sh | grep $1-upgrade-package) + if [ "$UPGRADE" == "" ]; then + echo "Upgrade script is not available..." + echo "You can force run the install script like this:" + echo "sudo hassbian-config -f install $1" + exit + fi check-permission source $SUITE_INSTALL_DIR/$1.sh $1-upgrade-package