1
1
#! /bin/sh
2
-
3
2
set -e
4
3
4
+ cd " $( dirname " $0 " ) "
5
5
FINAL_FILE=" zoom-platform.sh"
6
6
7
- cp " src.sh" " $FINAL_FILE "
8
-
9
- # Add licences to header
10
- HASHEDLIC=$( sed ' s/^/# /' < LICENSE)
11
- INNOLIC=' ###
12
- # This script uses a fork of "innoextract" licensed under the zlib/libpng license.
13
- #
14
- # Original innoextract (c) Daniel Scharrer <[email protected] > https://constexpr.org/innoextract/
15
- #
16
- # Fork by Jozen Blue Martinez for ZOOM Platform https://github.com/doZennn/innoextract
17
- ###'
18
-
19
- awk -i inplace -v r=" ###\n$HASHEDLIC \n###\n\n$INNOLIC " ' {gsub(/#__LICENSE_HERE__/,r)}1' " $FINAL_FILE "
20
-
21
- # set version to either release tag or commit hash
22
- VERSION=$( git tag --points-at HEAD)
23
- if [ -z " $VERSION " ]; then VERSION=" git-$( git rev-parse --short HEAD) " ; fi
24
- sed -i " s/INSTALLER_VERSION=\" DEV\" /INSTALLER_VERSION=\" $VERSION \" /" " $FINAL_FILE "
25
-
26
7
# Download innoextract binaries
27
8
rm -f innoextract.tar.gz innoextract-upx.tar.gz
28
9
INNOEXT_URLS=$( curl -s " https://api.github.com/repos/doZennn/innoextract/releases/latest" | grep ' "browser_download_url":.*innoextract.*.tar.gz' | sed -E ' s/.*"([^"]+)".*/\1/' )
@@ -31,12 +12,4 @@ echo "$INNOEXT_URLS" | wget -nv -i -
31
12
# Extract binaries
32
13
tar -xzf innoextract-upx.tar.gz
33
14
34
- # Add innoextract binary between comments
35
- START=" $( sed -n ' 1,/^#__INNOEXTRACT_BINARY_START__/p' " $FINAL_FILE " ) "
36
- # shellcheck disable=SC2016
37
- END=" $( sed -n ' /^#__INNOEXTRACT_BINARY_END__$/,${p;}' " $FINAL_FILE " ) "
38
- printf ' %s\nINNOEXTRACT_BINARY_B64=' " $START " > " $FINAL_FILE "
39
- base64 -w 0 innoextract-upx >> " $FINAL_FILE "
40
- printf ' \n%s' " $END " >> " $FINAL_FILE "
41
-
42
- chmod +x " $FINAL_FILE "
15
+ ./build.sh " src.sh" " innoextract-upx" > " $FINAL_FILE "
0 commit comments