manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1214244 - in /incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess: lock-clean.bat lock-clean.sh
Date Wed, 14 Dec 2011 13:56:42 GMT
Author: kwright
Date: Wed Dec 14 13:56:41 2011
New Revision: 1214244

URL: http://svn.apache.org/viewvc?rev=1214244&view=rev
Log:
Add example lock-clean scripts

Added:
    incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.bat  
(with props)
    incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh   (with
props)

Added: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.bat
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.bat?rev=1214244&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.bat (added)
+++ incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.bat Wed
Dec 14 13:56:41 2011
@@ -0,0 +1,31 @@
+@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 check that JAVA_HOME is set, and that the current directory is correct
+if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome
+if not exist ".\properties.xml" goto nolcfhome
+rem set MCF_HOME
+set MCF_HOME=%CD%
+rem invoke the AgentRun command
+cmd /c "processes\script\executecommand.bat org.apache.manifoldcf.core.LockClean"
+goto done
+:nojavahome
+echo Environment variable JAVA_HOME is not set properly.
+goto done
+:nolcfhome
+echo Current working directory does not contain a properties.xml file.
+goto done
+:done

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.bat
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh?rev=1214244&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh (added)
+++ incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh Wed
Dec 14 13:56:41 2011
@@ -0,0 +1,34 @@
+#!/bin/bash -e
+
+# 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.
+
+#Make sure environment variables are properly set
+if [ -e "$JAVA_HOME"/bin/java ] ; then
+    if [ -f ./properties.xml ] ; then
+        # Set the MCF_HOME variable
+        set MCF_HOME=$PWD
+        processes/script/executecommand org.apache.manifoldcf.core.LockClean
+        exit $?
+        
+    else
+        echo "Working directory contains no properties.xml file." 1>&2
+        exit 1
+    fi
+    
+else
+    echo "Environment variable JAVA_HOME is not properly set." 1>&2
+    exit 1
+fi

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/lock-clean.sh
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message