dist.src/install.sh

changeset 117
bc096357e324
parent 111
cb128bae1161
equal deleted inserted replaced
116:41981a23aff8 117:bc096357e324
1 #!/bin/sh 1 #!/bin/sh
2 2
3 PREFIX=/usr/local 3 PREFIX=/usr/local
4 VERSION=${project.version}
4 5
5 # help text 6 # help text
6 printhelp() 7 printhelp()
7 { 8 {
8 echo "Usage:" 9 echo "Usage:"
41 || exit_on_error "Creating install directory failed." 42 || exit_on_error "Creating install directory failed."
42 43
43 # 44 #
44 # install the JAR file 45 # install the JAR file
45 # 46 #
46 echo "cp ../target/uwproj-0.2.0-SNAPSHOT-jar-with-dependencies.jar $PREFIX/lib/uwproj/uwproj-0.2.0-SNAPSHOT.jar" 47 echo "cp ../target/uwproj-$VERSION-jar-with-dependencies.jar $PREFIX/lib/uwproj/uwproj-$VERSION.jar"
47 cp "../target/uwproj-0.2.0-SNAPSHOT-jar-with-dependencies.jar" "$PREFIX/lib/uwproj/uwproj-0.2.0-SNAPSHOT.jar" \ 48 cp "../target/uwproj-$VERSION-jar-with-dependencies.jar" "$PREFIX/lib/uwproj/uwproj-$VERSION.jar" \
48 || exit_on_error "Installing JAR file failed." 49 || exit_on_error "Installing JAR file failed."
49 50
50 # 51 #
51 # create a run script in the bin dir 52 # create a run script in the bin dir
52 # 53 #
57 echo "chmod 0555 $PREFIX/bin/uwproj" 58 echo "chmod 0555 $PREFIX/bin/uwproj"
58 chmod 0755 "$PREFIX/bin/uwproj" \ 59 chmod 0755 "$PREFIX/bin/uwproj" \
59 || exit_on_error "Changing permissions for run script failed." 60 || exit_on_error "Changing permissions for run script failed."
60 61
61 echo 62 echo
62 echo "uwproj has been successfully installed." 63 echo "uwproj $VERSION has been successfully installed."

mercurial