shellcheck

This commit is contained in:
Frank Denis 2023-11-09 22:47:41 +01:00
parent 88207560a7
commit cb80bf33e8
2 changed files with 15 additions and 14 deletions

View File

@ -2,12 +2,12 @@
## Docker test image for building an MSI locally ## Docker test image for building an MSI locally
``` ```sh
docker build . -f Dockerfile -t ubuntu:dnscrypt-msi docker build . -f Dockerfile -t ubuntu:dnscrypt-msi
``` ```
## Test building msi files for intel win32 & win64 ## Test building msi files for intel win32 & win64
``` ```sh
./build.sh ./build.sh
``` ```

View File

@ -1,29 +1,30 @@
#!/bin/bash #! /bin/sh
version=0.0.0 version=0.0.0
gitver=$(git describe --tags --always --match="[0-9]*.[0-9]*.[0-9]*" --exclude='*[^0-9.]*') gitver=$(git describe --tags --always --match="[0-9]*.[0-9]*.[0-9]*" --exclude='*[^0-9.]*')
if [[ "$gitver" != "" ]]; then if [ "$gitver" != "" ]; then
version=$gitver version=$gitver
fi fi
# build the image by running: docker build . -f Dockerfile -t ubuntu:dnscrypt-msi # build the image by running: docker build . -f Dockerfile -t ubuntu:dnscrypt-msi
if [[ "$(docker image list -q ubuntu:dnscrypt-msi)" == "" ]]; then if [ "$(docker image list -q ubuntu:dnscrypt-msi)" = "" ]; then
docker build . -f Dockerfile -t ubuntu:dnscrypt-msi docker build . -f Dockerfile -t ubuntu:dnscrypt-msi
fi fi
image=ubuntu:dnscrypt-msi image=ubuntu:dnscrypt-msi
for arch in x64 x86; do
for arch in x64 x86
do
binpath="win32" binpath="win32"
if [[ "$arch" == "x64" ]]; then if [ "$arch" = "x64" ]; then
binpath="win64" binpath="win64"
fi fi
src=$(cd ../../dnscrypt-proxy/$binpath; pwd) src=$(
echo $src cd ../../dnscrypt-proxy/$binpath || exit
pwd
)
echo "$src"
docker run --rm -v $(pwd):/wixproj -v $src:/src $image wine candle.exe -dVersion=$version -dPlatform=$arch -dPath=\\src -arch $arch \\wixproj\\dnscrypt.wxs -out \\wixproj\\dnscrypt-$arch.wixobj docker run --rm -v "$(pwd)":/wixproj -v "$src":/src $image wine candle.exe -dVersion="$version" -dPlatform=$arch -dPath=\\src -arch $arch \\wixproj\\dnscrypt.wxs -out \\wixproj\\dnscrypt-$arch.wixobj
docker run --rm -v $(pwd):/wixproj -v $src:/src $image wine light.exe -out \\wixproj\\dnscrypt-proxy-$arch-$version.msi \\wixproj\\dnscrypt-$arch.wixobj -sval docker run --rm -v "$(pwd)":/wixproj -v "$src":/src $image wine light.exe -out \\wixproj\\dnscrypt-proxy-$arch-"$version".msi \\wixproj\\dnscrypt-$arch.wixobj -sval
done done