forked from retog/docker-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
executable file
·80 lines (60 loc) · 1.67 KB
/
start.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
FAIL=0
if [ ! -d /home/developer/config ]; then
mkdir /home/developer/config
fi
if [ ! -d /home/developer/config/.mozilla ]; then
mkdir /home/developer/config/.mozilla
fi
if [ ! -d /home/developer/config/.idea ]; then
mkdir /home/developer/config/.idea
fi
if [ ! -d /home/developer/config/.config ]; then
mkdir /home/developer/config/.config
fi
sudo chown developer:developer /home/developer/config
if [ ! -d /home/developer/.mozilla ]; then
ln -s /home/developer/config/.mozilla /home/developer/.mozilla
fi
if [ ! -d /home/developer/.idea ]; then
ln -s /home/developer/config/.idea /home/developer/.idea
fi
if [ ! -d /home/developer/.config ]; then
ln -s /home/developer/config/.config /home/developer/.config
fi
if [ -d /home/developer/IdeaProjects ]; then
sudo chown developer:developer /home/developer/IdeaProjects
fi
if [ -d /home/developer/.m2 ]; then
sudo chown developer:developer /home/developer/.m2
fi
sudo chown developer:developer /home/developer/.idea
if [ ! -f /home/developer/.config/tilda/config_0 ]; then
if [ ! -d /home/developer/.config/tilda/ ]; then
mkdir -p /home/developer/.config/tilda/
fi
echo "copying tilda config"
cp /home/template/.config/tilda/config_0 /home/developer/.config/tilda/config_0
else
echo "tilda: preserving existing config."
fi
echo "starting"
/usr/local/bin/idea &
/usr/bin/firefox -no-remote &
/usr/bin/tilda -c /bin/bash &
TILDA_PID=$!
if [ /home/developer/config/autoexec.sh ]; then
/home/developer/config/autoexec.sh
fi
for job in `jobs -p | grep -v $TILDA_PID`
do
echo $job
wait $job || let "FAIL+=1"
done
echo $FAIL
if [ "$FAIL" == "0" ];
then
echo "BYE"
else
echo "FAIL! ($FAIL)"
fi