summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author isaackwy <isaacyu@protonmail.com>2024-01-27 22:40:55 -0800
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-01-30 07:57:01 +0700
commit81c12f501032c472f2fbbcac6982d289aae82229 (patch)
tree75319994850bc7f1129cdb463bdebf5fd849d84c
parent492a77980738366c0d971bf8a19f8e99b85a7917 (diff)
downloadslackbuilds-81c12f501032c472f2fbbcac6982d289aae82229.tar.gz
slackbuilds-81c12f501032c472f2fbbcac6982d289aae82229.tar.xz
system/OpenSnitch: Edit SlackBuild
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/OpenSnitch/OpenSnitch.SlackBuild8
1 files changed, 6 insertions, 2 deletions
diff --git a/system/OpenSnitch/OpenSnitch.SlackBuild b/system/OpenSnitch/OpenSnitch.SlackBuild
index 28a89d6bda..04ca9526b3 100644
--- a/system/OpenSnitch/OpenSnitch.SlackBuild
+++ b/system/OpenSnitch/OpenSnitch.SlackBuild
@@ -142,7 +142,9 @@ for DIR in $(grep -o "^# .* " vendor/modules.txt | cut -d' ' -f2)
do
NAME=$(echo $DIR | sed 's/[./]v[0-9]\+$//' | xargs basename)
DIR=vendor/$DIR
- echo $DIR
+
+ # The general rule is to extract the tarball: "tar xvf $CWD/$NAME-*.tar.gz"
+ # However, a few exceptions to this are necessary.
if [ $DIR = "vendor/github.com/golang/protobuf" ]; then
tar xvf $CWD/$NAME-[0-9]*.tar.gz
elif [ $DIR = "vendor/github.com/mdlayher/netlink" ]; then
@@ -158,8 +160,10 @@ do
else
tar xvf $CWD/$NAME-*.tar.gz
fi
+
+ # Rename extracted folders
mkdir -p $(dirname $DIR)
- [ $DIR != "vendor/google.golang.org/genproto" ] && mv $NAME-* $DIR || mv go-$NAME-* $DIR
+ [ $DIR = "vendor/google.golang.org/genproto" ] && mv go-$NAME-* $DIR || mv $NAME-* $DIR
done
# Build the opensnitch daemon