summaryrefslogtreecommitdiff
path: root/docker/builder.sh
blob: a7a2a40d0b6120f8d8d0dbdf8831eeeee9517da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -e
export HOSTDIR=/bitmask-vpn.host
export GUESTDIR=/bitmask-vpn
export DESTDIR="${HOSTDIR}"/deploy/
rm -rf "${GUESTDIR}"
cp -r "${HOSTDIR}" "${GUESTDIR}"
cd "${GUESTDIR}"
make prepare
make build
case $XBUILD in
    win)
        if [ "$STAGE" = "1" ]; then
            echo ""
            echo "[+] Bulding WIN installer >>>>>>>>>>> STAGE 1"
            make package_win_stage_1
            echo ""
        fi
        if [ "$STAGE" = "2" ]; then
            echo ""
            echo "[+] Building WIN installer >>>>>>>>>> STAGE 2"
            make package_win_stage_2
            echo ""
        fi
        ;;
    osx)
        make package_osx
        ;;
    yes)
        make packages
        ;;
esac
cp  "${GUESTDIR}"/deploy/* $DESTDIR