knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: KNOX-320: Simplify scripts for using Knox on windows (fix). (cherry picked from commit 83fe6647f3122378e1eae739df37c4d8041bc424)
Date Fri, 21 Mar 2014 20:02:48 GMT
Repository: knox
Updated Branches:
  refs/heads/v0.4.0 8973d4d12 -> 15b57d0cb


KNOX-320: Simplify scripts for using Knox on windows (fix).
(cherry picked from commit 83fe6647f3122378e1eae739df37c4d8041bc424)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/15b57d0c
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/15b57d0c
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/15b57d0c

Branch: refs/heads/v0.4.0
Commit: 15b57d0cb1846926cb3dab803543113f3d0c5e96
Parents: 8973d4d
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Fri Mar 21 16:01:46 2014 -0400
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Fri Mar 21 16:02:21 2014 -0400

----------------------------------------------------------------------
 gateway-release/home/bin/gateway.cmd | 71 ++++++++------------------
 gateway-release/home/bin/knoxcli.cmd | 60 ++++++----------------
 gateway-release/home/bin/ldap.cmd    | 84 +++++++++----------------------
 3 files changed, 60 insertions(+), 155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/15b57d0c/gateway-release/home/bin/gateway.cmd
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/gateway.cmd b/gateway-release/home/bin/gateway.cmd
index d0fb54b..d96932d 100644
--- a/gateway-release/home/bin/gateway.cmd
+++ b/gateway-release/home/bin/gateway.cmd
@@ -1,64 +1,35 @@
-@REM
-
-@REM Licensed to the Apache Software Foundation (ASF) under one or more
-
-@REM contributor license agreements. See the NOTICE file distributed with
-
-@REM this work for additional information regarding copyright ownership.
-
-@REM The ASF licenses this file to You under the Apache License, Version 2.0
-
-@REM (the "License"); you may not use this file except in compliance with
-
-@REM the License. You may obtain a copy of the License at
-
-@REM
-
-@REM http://www.apache.org/licenses/LICENSE-2.0
-
-@REM
-
-@REM Unless required by applicable law or agreed to in writing, software
-
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
-@REM See the License for the specific language governing permissions and
-
-@REM limitations under the License.
-
-@REM
-
-@ECHO OFF
-
-
+@echo off
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
 
 REM Start/stop script location
-
-SET APP_BIN_DIR=%~dp0
-
-
+set APP_BIN_DIR=%~dp0
 
 REM The app's jar name
-
-SET APP_JAR=%APP_BIN_DIR%gateway.jar
-
-
+set APP_JAR=%APP_BIN_DIR%gateway.jar
 
 if not exist "%JAVA_HOME%"\bin\java.exe (
-
   echo Error: JAVA_HOME is incorrectly set.
-
   exit /B 1
-
 )
 set JAVA="%JAVA_HOME%"\bin\java
 
+"%JAVA%" -jar "%APP_JAR%"
 
-
-"%JAVA%" -jar "%APP_JAR%
-
-"
+if not %ERRORLEVEL% == 0 (
+  exit /B %ERRORLEVEL%
+)
 
 exit /B 0

http://git-wip-us.apache.org/repos/asf/knox/blob/15b57d0c/gateway-release/home/bin/knoxcli.cmd
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/knoxcli.cmd b/gateway-release/home/bin/knoxcli.cmd
index 7fa9f50..2e665a2 100644
--- a/gateway-release/home/bin/knoxcli.cmd
+++ b/gateway-release/home/bin/knoxcli.cmd
@@ -1,65 +1,35 @@
-@ECHO OFF
+@echo off
 REM  Licensed to the Apache Software Foundation (ASF) under one or more
 REM  contributor license agreements.  See the NOTICE file distributed with
 REM  this work for additional information regarding copyright ownership.
 REM  The ASF licenses this file to You under the Apache License, Version 2.0
 REM  (the "License"); you may not use this file except in compliance with
 REM  the License.  You may obtain a copy of the License at
-
+REM
 REM      http://www.apache.org/licenses/LICENSE-2.0
-
+REM
 REM  Unless required by applicable law or agreed to in writing, software
 REM  distributed under the License is distributed on an "AS IS" BASIS,
 REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM  See the License for the specific language governing permissions and
 REM  limitations under the License.
 
-REM The app's label
-SET APP_LABEL=KnoxCLI
-
-REM The app's name
-REM APP_NAME=knoxcli
-
 REM Start/stop script location
-SET APP_BIN_DIR=%~dp0
+set APP_BIN_DIR=%~dp0
 
 REM The app's jar name
-SET APP_JAR=%APP_BIN_DIR%knoxcli.jar
-
-REM The apps home dir
-SET APP_HOME_DIR=%APP_BIN_DIR:~0,-5%
-
-REM The apps home dir
-SET APP_CONF_DIR=%APP_HOME_DIR%\conf
-
-REM The app's log dir
-SET APP_LOG_DIR=%APP_HOME_DIR%\logs
-
-REM The app's logging options
-SET APP_LOG_OPTS=
-
-REM The app's memory options
-SET APP_MEM_OPTS=
-
-REM The app's debugging options
-SET APP_DBG_OPTS=
-
-REM  Name of LOG/OUT/ERR file
-SET APP_OUT_FILE=%APP_LOG_DIR%\%APP_NAME%.out
-SET APP_ERR_FILE=%APP_LOG_DIR%\%APP_NAME%.err
+set APP_JAR=%APP_BIN_DIR%knoxcli.jar
 
+if not exist "%JAVA_HOME%"\bin\java.exe (
+  echo Error: JAVA_HOME is incorrectly set.
+  exit /B 1
+)
+set JAVA="%JAVA_HOME%"\bin\java
 
-: main 
-   ECHO "Starting %APP_LABEL% "
-   
-    java %APP_MEM_OPTS% %APP_DBG_OPT% %APP_LOG_OPTS% -jar "%APP_JAR%"  %*
-	
-	IF NOT %ERRORLEVEL% ==0 (
-		Exit /B 1
-		)
+"%JAVA%" -jar "%APP_JAR%" %*
 
- Exit /B 0
+if not %ERRORLEVEL% == 0 (
+  exit /B %ERRORLEVEL%
+)
 
-:printHelp 
-   java -jar "%APP_JAR%" -help
- Exit /B 0
+exit /B 0

http://git-wip-us.apache.org/repos/asf/knox/blob/15b57d0c/gateway-release/home/bin/ldap.cmd
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/ldap.cmd b/gateway-release/home/bin/ldap.cmd
index 9132856..8e0b064 100644
--- a/gateway-release/home/bin/ldap.cmd
+++ b/gateway-release/home/bin/ldap.cmd
@@ -1,78 +1,42 @@
-@REM
-
-@REM Licensed to the Apache Software Foundation (ASF) under one or more
-
-@REM contributor license agreements. See the NOTICE file distributed with
-
-@REM this work for additional information regarding copyright ownership.
-
-@REM The ASF licenses this file to You under the Apache License, Version 2.0
-
-@REM (the "License"); you may not use this file except in compliance with
-
-@REM the License. You may obtain a copy of the License at
-
-@REM
-
-@REM http://www.apache.org/licenses/LICENSE-2.0
-
-@REM
-
-@REM Unless required by applicable law or agreed to in writing, software
-
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
-@REM See the License for the specific language governing permissions and
-
-@REM limitations under the License.
-
-@REM
-
-@ECHO OFF
-
-
-
-REM  The app's home dir
-
-SET APP_HOME_DIR=%APP_BIN_DIR:~0,-5%
-
-
-
-REM The apps home dir
-
-SET APP_CONF_DIR=%APP_HOME_DIR%\conf
-
-
+@echo off
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
 
 REM Start/stop script location
+set APP_BIN_DIR=%~dp0
 
-SET APP_BIN_DIR=%~dp0
-
+REM  The app's home dir
+set APP_HOME_DIR=%APP_BIN_DIR:~0,-5%
 
+REM The apps conf dir
+set APP_CONF_DIR=%APP_HOME_DIR%\conf
 
 REM The app's jar name
-
-SET APP_JAR=%APP_BIN_DIR%ldap.jar
-
-
+set APP_JAR=%APP_BIN_DIR%ldap.jar
 
 if not exist "%JAVA_HOME%"\bin\java.exe (
-
   echo Error: JAVA_HOME is incorrectly set.
-
   exit /B 1
-
 )
-
 set JAVA="%JAVA_HOME%"\bin\java
 
-
-
 "%JAVA%" -jar "%APP_JAR%" "%APP_CONF_DIR%"
 
-
+if not %ERRORLEVEL% == 0 (
+  exit /B %ERRORLEVEL%
+)
 
 exit /B 0
 


Mime
View raw message