summaryrefslogtreecommitdiff
path: root/docker/builder.sh
blob: 482021acb3efbaf366669c0357e55f613c816695 (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
34
35
36
37
38
39
40
41
42
43
44
#!/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
case $TYPE in
    snap)
        echo "[+] Building SNAP"
        make package_snap
        ;;
    *)
        make build
        ;;
esac
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
        ;;
    default)
        echo "no XBUILD set..."
        ;;
esac
cp  "${GUESTDIR}"/deploy/* $DESTDIR