Skip to content

Commit

Permalink
Adding BAT runner (written on Unix and not tested).
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Dvorak committed Oct 14, 2014
1 parent d0b85c8 commit 833c9b3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
35 changes: 35 additions & 0 deletions bin/keepass2-to-keepassx.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@echo off

@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at

@REM http://www.apache.org/licenses/LICENSE-2.0

@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.

:checkJava
set _JAVACMD=%JAVACMD%

if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto endcommon

:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe

:endcommon

"%_JAVACMD%" -classpath "..\lib\keepass2-to-keepassx.jar:..\lib\xpp3-1.1.4c.jar" com.mindforger.keepass.Keepass2DatabaseToKeepassXDatabase %1 %2

@REM eof
17 changes: 17 additions & 0 deletions bin/keepass2-to-keepassx.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

export SCRIPTHOME=`pwd`
java -classpath ${SCRIPTHOME}/../lib/keepass2-to-keepassx.jar:${SCRIPTHOME}/../lib/xpp3-1.1.4c.jar com.mindforger.keepass.Keepass2DatabaseToKeepassXDatabase ${1} ${2}

Expand Down

0 comments on commit 833c9b3

Please sign in to comment.