system/OpenSnitch: Edit SlackBuild

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
isaackwy 2024-01-27 22:40:55 -08:00 committed by Willy Sudiarto Raharjo
parent 492a779807
commit 81c12f5010

View file

@ -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