forked from snapcrafters/eclipse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtry-build.sh
executable file
·37 lines (29 loc) · 994 Bytes
/
try-build.sh
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
#!/bin/bash
set -e
if [ -n $1 ]; then
ECLIPSE_PACKAGE=$1
fi
export ECLIPSE_PACKAGE=${ECLIPSE_PACKAGE:='eclipse-java'}
export ECLIPSE_CONFINED=${ECLIPSE_CONFINED:=false}
. ./set-eclipse-package.sh
CLEAN=${CLEAN:=false}
if $CLEAN; then
sudo snap remove --purge $ECLIPSE_PACKAGE
snapcraft clean
fi
# sudo less /var/snap/lxd/common/lxd/logs/lxd.log
snapcraft pack --debug
if $ECLIPSE_CONFINED; then
sudo snap install ./$(echo $ECLIPSE_PACKAGE)_*_$(dpkg --print-architecture).snap --dangerous
sudo snap connect $ECLIPSE_PACKAGE:personal-sourcedir
sudo snap connect $ECLIPSE_PACKAGE:personal-workspace
sudo snap connect $ECLIPSE_PACKAGE:personal-gitconfig
sudo snap connect $ECLIPSE_PACKAGE:personal-sshid
sudo snap connect $ECLIPSE_PACKAGE:personal-maven-cache
else
sudo snap install ./$(echo $ECLIPSE_PACKAGE)_*_$(dpkg --print-architecture).snap --dangerous --classic
fi
AUTORUN=${AUTORUN:=false}
if $AUTORUN; then
snap run $ECLIPSE_PACKAGE &
fi