Skip to content

Commit

Permalink
Add batch mode flag to freeciv-web/build.sh
Browse files Browse the repository at this point in the history
Colored output when building interactively is just nicer
  • Loading branch information
mchenryc committed Aug 27, 2018
1 parent 8fdfdc9 commit fb52f7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion freeciv-web/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash
# builds Freeciv-web and copies the war file to Tomcat.

BATCH_MODE=""

while [[ $# -gt 0 ]]; do
case $1 in
-B) BATCH_MODE="-B"; shift;;
*) echo "Unrecognized argument: $1"; shift;;
esac
done

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

TOMCATDIR="/var/lib/tomcat8"
Expand All @@ -21,6 +30,6 @@ else
fi

echo "maven package"
mvn -B flyway:migrate package && \
mvn ${BATCH_MODE} flyway:migrate package && \
echo "Copying target/freeciv-web.war to ${TOMCATDIR}/webapps" && \
cp target/freeciv-web.war "${TOMCATDIR}/webapps/"
2 changes: 1 addition & 1 deletion scripts/install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ mkdir -p "${basedir}/freeciv-web/src/derived/webapp" && \
handle_error 6 "Failed to synchronize freeciv project"

cd "${basedir}"/freeciv-web && \
./build.sh || \
./build.sh -B || \
handle_error 7 "Failed to build freeciv-web server"

echo "==== Setting up nginx ===="
Expand Down

0 comments on commit fb52f7a

Please sign in to comment.