Skip to content

Commit

Permalink
Fix broken Linux build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
scovetta committed Mar 30, 2019
1 parent cd32f38 commit 0b04335
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Cli/build_linux.sh 100644 → 100755
@@ -1,18 +1,21 @@
release="Debug"
#!/bin/bash

RELEASE="Debug"
while [ "$1" != "" ]; do
case $1 in
-r | --release ) shift
release=$1
case "$1" in
-r | --release )
shift
RELEASE="$1"
esac
shift
done

if ["$release" = "Debug"]; then
if [ "$RELEASE" == "Debug" ]; then
dotnet build
fi
if ["$release" = "Release"]; then
version=`nbgv get-version -v AssemblyInformationalVersion`
dotnet publish -c Release -r linux-x64 --self-contained true && ../Tools/linux-x64.warp-packer --arch linux-x64 --input_dir bin/Release/netcoreapp2.1/linux-x64/publish/ --exec AttackSurfaceAnalyzerCli --output bin/AttackSurfaceAnalyzerCli-linux-$version.bin
elif [ "$RELEASE" == "Release" ]; then
VERSION=$(nbgv get-version -v AssemblyInformationalVersion)
dotnet publish -c "$RELEASE" -r linux-x64 --self-contained true && ../Tools/linux-x64.warp-packer --arch linux-x64 --input_dir bin/Release/netcoreapp2.1/linux-x64/publish/ --exec AttackSurfaceAnalyzerCli --output bin/AttackSurfaceAnalyzerCli-linux-$VERSION.bin
chmod +x AttackSurfaceAnalyzerCli
fi

echo "Build completed, result is located at ./AttackSurfaceAnalyzerCli"

0 comments on commit 0b04335

Please sign in to comment.