Unverified Commit 6c8d86cb authored by Misagh Moayyed's avatar Misagh Moayyed
Browse files

make executable the default

parent fdd9e2af
......@@ -97,5 +97,4 @@ Invokes the CAS Command Line Shell. For a list of commands either use no argumen
```bash
./build.sh command
```
```
\ No newline at end of file
......@@ -23,6 +23,7 @@
@if "%1" == "bootrun" call:bootrun %2 %3 %4
@if "%1" == "debug" call:debug %2 %3 %4
@if "%1" == "run" call:run %2 %3 %4
@if "%1" == "runalone" call:runalone %2 %3 %4
@if "%1" == "help" call:help
@if "%1" == "gencert" call:gencert
@if "%1" == "command" call:command
......@@ -67,6 +68,10 @@
call:package %1 %2 %3 & java %JAVA_ARGS% -jar target/cas.war
@goto:eof
:runalone
call:package %1 %2 %3 & target/cas.war
@goto:eof
:gencert
where /q keytool
if ERRORLEVEL 1 (
......
......@@ -14,7 +14,8 @@ function help() {
echo " copy: Copy config from ./etc/cas/config to /etc/cas/config"
echo " clean: Clean Maven build directory"
echo " package: Clean and build CAS war, also call copy"
echo " run: Build and run CAS.war via spring boot (java -jar target/cas.war)"
echo " run: Build and run cas.war via spring boot (java -jar target/cas.war)"
echo " runalone: Build and run cas.war on its own (target/cas.war)"
echo " debug: Run CAS.war and listen for Java debugger on port 5000"
echo " bootrun: Run with maven spring boot plugin, doesn't work with multiple dependencies"
echo " gencert: Create keystore with SSL certificate in location where CAS looks by default"
......@@ -42,6 +43,10 @@ function run() {
package && java -jar target/cas.war
}
function runalone() {
package && chmod +x target/cas.war && target/cas.war
}
function gencert() {
if [[ ! -d /etc/cas ]] ; then
copy
......@@ -60,13 +65,13 @@ function gencert() {
}
function command() {
CAS_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${cas.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec 2>/dev/null)
COMMAND_FILE="./target/cas-server-support-shell-${CAS_VERSION}.jar"
if [ ! -f "$COMMAND_FILE" ]; then
package
wget -q http://repo1.maven.org/maven2/org/apereo/cas/cas-server-support-shell/${CAS_VERSION}/cas-server-support-shell-${CAS_VERSION}.jar -P ./target
fi
java -jar target/cas-server-support-shell-${CAS_VERSION}.jar "$@"
CAS_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${cas.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec 2>/dev/null)
COMMAND_FILE="./target/cas-server-support-shell-${CAS_VERSION}.jar"
if [ ! -f "$COMMAND_FILE" ]; then
package
wget -q http://repo1.maven.org/maven2/org/apereo/cas/cas-server-support-shell/${CAS_VERSION}/cas-server-support-shell-${CAS_VERSION}.jar -P ./target
fi
java -jar target/cas-server-support-shell-${CAS_VERSION}.jar "$@"
}
if [ $# -eq 0 ]; then
......@@ -98,6 +103,9 @@ case "$1" in
"run")
run "$@"
;;
"runalone")
runalone "$@"
;;
"gencert")
gencert "$@"
;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment