#!/bin/tcsh
# 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.
# 
#
# Tool:  Long lister
# Purpose:  Provide metadata information for all files in a directory.  
# Interface:  Command-line.  If no arguments provided, assume the current 
# directory.  Arguments can be a directory or a filename specification 
# with wildcards.
# Output:  Text to standard out.  One line per file.  Fields of line 
# (tab-separated):
#    Filename
#    Test Tag(s)
#    Test Counter(s)
#    Subtest tag(s)
#    DataStartTime
#    DataEndTime
#  
# Note this behavior can be overriden by specifications in the pcs-ll-conf.xml 
# file.
#
# Sample usage: ./pcs_ll


set ORIG_DIR = `pwd`
set DIR = `dirname $0`
cd $DIR
set DIR_PATH = `pwd`
cd $ORIG_DIR

java -Djava.util.logging.config.file=$DIR_PATH/../etc/logging.properties \
    -Djava.ext.dirs=$DIR_PATH/../lib:$DIR_PATH/../../filemgr/lib:$DIR_PATH/../../workflow/lib \
	org.apache.oodt.pcs.tools.PCSLongLister \
	$FILEMGR_URL $DIR_PATH/../policy/pcs-ll-conf.xml $argv[2-$#argv]
