From 982b671051d988b374808cd7bd67310d8e9a4d51 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 14 Oct 2023 23:33:51 +0100 Subject: add proper t_cls --- src/util/shmk.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/util/shmk.sh') diff --git a/src/util/shmk.sh b/src/util/shmk.sh index 75b97f7..75e1445 100755 --- a/src/util/shmk.sh +++ b/src/util/shmk.sh @@ -4,6 +4,8 @@ #include colors +PREFIX=${PREFIX:-/usr} + usage () { cat << EOF ${BLUE}Available Options: @@ -102,6 +104,20 @@ interpret_shmk () { install -Dm755 $DIST/$lib ${DESTDIR}/${PREFIX}/lib/$lib.sh #Install library $lib" done ;; + uninstall) + for prog in $PROGS; do + prog=$(basename $prog) + prog="${prog%.*}" + cmdlist="$cmdlist + rm ${DESTDIR}/${PREFIX}/bin/$prog #Uninstall program $prog" + done + for lib in $LIBS; do + lib=$(basename $lib) + lib="${lib%.*}" + cmdlist="$cmdlist + rm $DIST/$lib ${DESTDIR}/${PREFIX}/lib/$lib.sh #Uninstall library $lib" + done + ;; clean) [ -d "$DIST" ] && cmdlist="$cmdlist rm -r $DIST #Clean" -- cgit v1.2.1