From 2c6adea15068ff828344c034142b74883fe6a9ae Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 20 Apr 2019 21:55:26 -0400 Subject: refactor 'make dist' archive creation into a shell script --- bin/build-distribution-archives | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 bin/build-distribution-archives (limited to 'bin/build-distribution-archives') diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives new file mode 100755 index 00000000..1015d246 --- /dev/null +++ b/bin/build-distribution-archives @@ -0,0 +1,27 @@ +# TRAVIS_BRANCH is the branch name or the name of the tag. +VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)" +OS="${TRAVIS_OS_NAME}" +ARCH="$(uname -m)" + +cp -a images/examples palettes symbols fonts dist/inkstitch +cp -a icons locales print dist/inkstitch/bin + +if [ "$BUILD" = "osx" ]; then + cp -a electron/dist/mac dist/inkstitch/electron +else + cp -a electron/dist/*-unpacked dist/inkstitch/electron +fi + +for d in inx/*; do + lang=${d%.*} + lang=${lang#*/} + cp $d/*.inx dist + + cd dist + if [ "$BUILD" = "windows" ]; then + zip -r ../inkstitch-${VERSION}-win32-${lang}.zip * + else + tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * + fi + cd .. +done \ No newline at end of file -- cgit v1.2.3