From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
Date: Wed, 20 Sep 2023 11:35:06 +0200
Subject: install.sh: Allow to skip cli installation

---
 install.sh.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/install.sh.in b/install.sh.in
index d5381ba..17afbf8 100755
--- a/install.sh.in
+++ b/install.sh.in
@@ -9,8 +9,10 @@ SUDO=${SUDO:-sudo}
 
 if [ "$ARG1" == "install" ]; then
   "${SUDO}" mkdir -p "/usr/local/bin/"
-  "${SUDO}" cp "$SCRIPT_DIR/varnamcli" "${DESTDIR}@INSTALL_PREFIX@/bin/varnamcli"
-
+  if [ -f $SCRIPT_DIR/varnamcli ]; then
+    "${SUDO}" cp "$SCRIPT_DIR/varnamcli" "${DESTDIR}@INSTALL_PREFIX@/bin/varnamcli"
+  fi
+  
   "${SUDO}" mkdir -p "${DESTDIR}@INSTALL_PREFIX@/lib/pkgconfig"
   "${SUDO}" cp "$SCRIPT_DIR/@LIB_NAME@" "${DESTDIR}@INSTALL_PREFIX@/lib/@LIB_NAME@.@VERSION@"
   "${SUDO}" ln -sf "${DESTDIR}@INSTALL_PREFIX@/lib/@LIB_NAME@.@VERSION@" "${DESTDIR}@INSTALL_PREFIX@/lib/@LIB_NAME@"
