aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-01-10 01:06:32 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-01-10 01:06:32 +0100
commit52ee02d97169ee59072c24e2ac5d717cfaf359fc (patch)
treed6ff45e0f414fe00d11a21c8a399c9a43d28cc78 /build-aux
parent170210579bbe1259315eab2c7f5893448b3f961c (diff)
downloadblogc-52ee02d97169ee59072c24e2ac5d717cfaf359fc.tar.gz
blogc-52ee02d97169ee59072c24e2ac5d717cfaf359fc.tar.bz2
blogc-52ee02d97169ee59072c24e2ac5d717cfaf359fc.zip
build: improved windows build script
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/build-windows.sh18
1 files changed, 6 insertions, 12 deletions
diff --git a/build-aux/build-windows.sh b/build-aux/build-windows.sh
index 267a8aa..bdecc8b 100755
--- a/build-aux/build-windows.sh
+++ b/build-aux/build-windows.sh
@@ -5,24 +5,18 @@
#
# mingw32-gcc mingw64-gcc zip
#
-# This script must be called with the xz source tarball as argument.
+# This script must be called with the xz source tarball and the target version
+# as arguments.
set -ex
-[[ $# -eq 1 ]]
-
-
-get_version() {
- local a=$(basename "${1}")
- a="${a%.tar.xz}"
- echo "${a#blogc-}"
-}
+[[ $# -eq 2 ]]
build() {
- local version=$(get_version "${1}")
- local arch=${2}
+ local version=${2}
+ local arch=${3}
local build_dir="/tmp/blogc_build_${version}_${arch}"
local dest_dir="/tmp/blogc-${version}-w${arch}"
@@ -50,5 +44,5 @@ build() {
for arch in 32 64; do
- build "$1" "${arch}"
+ build "$1" "$2" "${arch}"
done