Skip to content

Commit cb80bf3

Browse files
committed
shellcheck
1 parent 8820756 commit cb80bf3

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

contrib/msi/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Docker test image for building an MSI locally
44

5-
```
5+
```sh
66
docker build . -f Dockerfile -t ubuntu:dnscrypt-msi
77
```
88

99
## Test building msi files for intel win32 & win64
1010

11-
```
11+
```sh
1212
./build.sh
1313
```

contrib/msi/build.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
1-
#!/bin/bash
1+
#! /bin/sh
22

33
version=0.0.0
44
gitver=$(git describe --tags --always --match="[0-9]*.[0-9]*.[0-9]*" --exclude='*[^0-9.]*')
5-
if [[ "$gitver" != "" ]]; then
6-
version=$gitver
5+
if [ "$gitver" != "" ]; then
6+
version=$gitver
77
fi
88

99
# build the image by running: docker build . -f Dockerfile -t ubuntu:dnscrypt-msi
10-
if [[ "$(docker image list -q ubuntu:dnscrypt-msi)" == "" ]]; then
10+
if [ "$(docker image list -q ubuntu:dnscrypt-msi)" = "" ]; then
1111
docker build . -f Dockerfile -t ubuntu:dnscrypt-msi
1212
fi
1313

1414
image=ubuntu:dnscrypt-msi
1515

16-
17-
for arch in x64 x86
18-
do
16+
for arch in x64 x86; do
1917
binpath="win32"
20-
if [[ "$arch" == "x64" ]]; then
18+
if [ "$arch" = "x64" ]; then
2119
binpath="win64"
2220
fi
23-
src=$(cd ../../dnscrypt-proxy/$binpath; pwd)
24-
echo $src
21+
src=$(
22+
cd ../../dnscrypt-proxy/$binpath || exit
23+
pwd
24+
)
25+
echo "$src"
2526

26-
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
27-
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
27+
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
28+
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
2829

2930
done

0 commit comments

Comments
 (0)