From e104033e6b5d9c30f5f45f1d8a2ec6e4632968eb Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 14 Sep 2023 11:01:18 +0200 Subject: [PATCH] fix: [vps] provide an informative message upon missing ``kal-shlib`` --- bin/vps | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bin/vps b/bin/vps index 89ce39e..51c9841 100755 --- a/bin/vps +++ b/bin/vps @@ -1,7 +1,24 @@ #!/bin/bash -. /etc/shlib +. /etc/shlib >/dev/null 2>&1 || { + echo "Error: you don't have kal-shlib-core installed." + echo "" + echo " You might want to add `deb.kalysto.org` deb repository, you'll need root access," + echo " so you might want to run these command after a \`sudo -i\` for instance..." + echo "" + echo " echo deb https://deb.kalysto.org no-dist kal-alpha kal-beta kal-main \\" + echo " > /etc/apt/sources.list.d/kalysto.org.list" + echo " wget -O - https://deb.kalysto.org/conf/public-key.gpg | apt-key add -" + echo " apt-get update -o Dir::Etc::sourcelist=sources.list.d/kalysto.org.list \\" + echo " -o Dir::Etc::sourceparts=- -o APT::Get::List-Cleanup=0" + echo "" + echo " Then install package kal-shlib-*:" + echo "" + echo " apt install kal-shlib-{common,cmdline,config,cache,docker,pretty}" + echo "" + exit 1 +} >&2 include common include parse