Improve internal tooling

This commit is contained in:
Daniel
2020-12-04 16:55:52 +01:00
parent 7334000e53
commit 7f26a28776
10 changed files with 359 additions and 209 deletions

18
cmds/trafficgen/pack Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
baseDir="$( cd "$(dirname "$0")" && pwd )"
cd "$baseDir"
echo "building..."
GOOS=windows go build
dstFile="../../../portmaster-windows-kext/install/MINGW/amd64/trafficgen.exe"
if [[ -d $(dirname "$dstFile") ]]; then
# make path absolute
dstFile="$(cd "$(dirname "$dstFile")" && pwd)/$(basename "$dstFile")"
# copy
echo "copying to $dstFile"
cp trafficgen.exe "$dstFile"
else
echo "not copying to $dstFile (dir does not exist)"
fi