|
3 | 3 | set -e
|
4 | 4 |
|
5 | 5 | if [ $UID != 0 ]; then
|
6 |
| - echo "This script must be run as root." |
| 6 | + echo 'This script must be run as root.' |
7 | 7 | exit 1
|
8 | 8 | fi
|
9 | 9 |
|
10 |
| -echo "Remounting root as read-write ------------------------------------------------" |
| 10 | +echo 'Remounting root as read-write ------------------------------------------------' |
11 | 11 |
|
12 | 12 | mount -o remount,rw /
|
13 | 13 |
|
14 |
| -echo "Installing Go and dependencies -----------------------------------------------" |
| 14 | +echo 'Installing Go and dependencies -----------------------------------------------' |
15 | 15 |
|
16 | 16 | apt-get update
|
17 | 17 | apt-get install -y \
|
18 | 18 | golang-go g++ git pkg-config \
|
19 | 19 | qtbase5-private-dev qtdeclarative5-private-dev libqt5opengl5-dev
|
20 | 20 | apt-get clean
|
21 | 21 |
|
22 |
| -echo "Setting up enviornment for phablet user --------------------------------------" |
| 22 | +echo 'Setting up environment for phablet user --------------------------------------' |
23 | 23 |
|
24 | 24 | echo 'export GOPATH=$HOME' >> ~phablet/.bash_profile
|
25 | 25 |
|
26 |
| -echo "Fetching the qml package -----------------------------------------------------" |
| 26 | +echo 'Fetching the qml package -----------------------------------------------------' |
27 | 27 |
|
28 |
| -su -l phablet -c "go get gopkg.in/qml.v0" |
| 28 | +su -l phablet -c 'go get gopkg.in/qml.v0' |
29 | 29 |
|
30 |
| -echo "Installing the .desktop file for the particle example ------------------------" |
| 30 | +echo 'Installing the .desktop file for the particle example ------------------------' |
31 | 31 |
|
32 |
| -APP_ID=gopkg.in.qml.particle-example |
| 32 | +APP_ID='gopkg.in.qml.particle-example' |
33 | 33 | cp ~phablet/src/gopkg.in/qml.v*/cmd/ubuntu-touch/particle.desktop ~phablet/.local/share/applications/$APP_ID.desktop
|
34 | 34 |
|
35 |
| -echo "Building and launching particle example ----------------------------------------------------" |
| 35 | +echo 'Building and launching particle example --------------------------------------' |
36 | 36 |
|
37 |
| -su -l phablet -c "go build gopkg.in/qml.v0/examples/particle" |
| 37 | +su -l phablet -c 'cd $HOME/src/gopkg.in/qml.v0/examples/particle; go build' |
38 | 38 |
|
39 |
| -echo "Launching particle example ---------------------------------------------------" |
| 39 | +echo 'Launching particle example ---------------------------------------------------' |
40 | 40 |
|
41 | 41 | su -l phablet -c "upstart-app-launch $APP_ID"
|
0 commit comments