1 | #!/bin/bash
|
---|
2 |
|
---|
3 | if [ ! -d webswing-20.2.5 ] ;
|
---|
4 |
|
---|
5 | echo "****"
|
---|
6 | echo "* Untarring Webswing"
|
---|
7 | echo "****"
|
---|
8 |
|
---|
9 | tar xvzf webswing-20.2.5.tar.gz
|
---|
10 | fi
|
---|
11 |
|
---|
12 | echo "****"
|
---|
13 | echo "* Compiling up Webswing"
|
---|
14 | echo "****"
|
---|
15 |
|
---|
16 | if [ ! -d /.Trash-$UID ] ; then
|
---|
17 |
|
---|
18 | echo ""
|
---|
19 | echo "If compiling up Webswing on a disk partition different to /home/$USER area"
|
---|
20 | echo "then the Gnome-based 'trash' command needs to have the following writable directory:"
|
---|
21 | echo " /.Trash-$UID"
|
---|
22 | echo ""
|
---|
23 | echo "Otherwise, webswing-driectdraw-javascript files with the file-permission error:"
|
---|
24 | echo " Error: EACCES: permission denied, mkdir '/.Trash-$UID'"
|
---|
25 | echo ""
|
---|
26 | echo "This can be addressed by running:"
|
---|
27 | echo " sudo mkdir /.Trash-\$UID && sudo chown \$USER:\$USER /.Trash-\$UID"
|
---|
28 | echo ""
|
---|
29 |
|
---|
30 | echo "If required, press ^C to exit, and then run the above command"
|
---|
31 | echo "Sleeping for 5 seconds ..."
|
---|
32 | sleep 5
|
---|
33 | fi
|
---|
34 |
|
---|
35 |
|
---|
36 | #echo cd webswing-20.2.5 && mvn -Pbuild,release clean install
|
---|
37 | #cd webswing-20.2.5 && mvn -Pbuild,release clean install
|
---|
38 |
|
---|
39 |
|
---|
40 | echo cd webswing-20.2.5 && mvn -Pbuild,release install
|
---|
41 | cd webswing-20.2.5 && mvn -Pbuild,release install
|
---|
42 |
|
---|
43 | target_dir=webswing-20.2.5/webswing-server/webswing-server-war/target
|
---|
44 |
|
---|
45 | if [ -f $target_dir/webswing-server.war ] ; then
|
---|
46 | echo "Error: File not found:" 1>&2
|
---|
47 | echo " $target_dir/webswing-server" 1>&2
|
---|
48 | echo "Unsuccessful compilation of webswing!" 1>&2
|
---|
49 | exit 1
|
---|
50 | else
|
---|
51 | echo "Installing webswing-server.war into ../web/"
|
---|
52 | /bin/cp $target_dir/webswing-server.war ../web/.
|
---|
53 | fi
|
---|
54 |
|
---|
55 |
|
---|