From 88ab68f1d90741630b298343468bbe444c23c766 Mon Sep 17 00:00:00 2001 From: Hrishikesh Gohain Date: Tue, 3 Feb 2026 12:53:41 +0530 Subject: [PATCH] feat: add setup script can be used for installation and uninstallation steps: chmod +x setup.sh ./setup.sh install for installtion ./setup.sh uninstall for uninstalltion Signed-off-by: Hrishikesh Gohain --- setup.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 setup.sh diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..8bbb0af --- /dev/null +++ b/setup.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -e + +BUILD=build + +case "$1" in + install) + mkdir -p "$BUILD" + cmake -S . -B "$BUILD" + cmake --build "$BUILD" -j"$(nproc)" + sudo cmake --install "$BUILD" + ;; + + uninstall) + [ -f "$BUILD/install_manifest.txt" ] || { + echo "No install_manifest.txt found" + exit 1 + } + sudo xargs rm -f < "$BUILD/install_manifest.txt" + systemctl --user daemon-reload || true + ;; + + *) + echo "Usage: $0 {install|uninstall}" + exit 1 + ;; +esac