#!/bin/sh
#++++++++++++++++
# Copyright:    (C) 2008-2017 UDS/CNRS
# License:       GNU General Public License
#.IDENTIFICATION findsdss
#.LANGUAGE       Bourne shell
#.AUTHOR         Francois Ochsenbein [CDS]
#.ENVIRONMENT    CDSclient Scripts
#.KEYWORDS       UCAC2 catalog
#.VERSION  1.0   08-Aug-2005
#.VERSION  1.1   31-Oct-2005: -2 / -full
#.VERSION  1.2   01-Sep-2008: for proxy usage
#.VERSION  2.0   23-Aug-2009: Bourne shell
#.PURPOSE        Find Stars in SDSS installations at CDS
#.COMMENTS       The "CDSCLIENT" env. variable indicates node ,
#		 eventually preceded by 'http:'
#----------------

D_BIN=`dirname $0`
pgm=`basename $0`
rpc=`basename $0 | sed 's/find//'`

# No argument is assumed to call for help
test $# -eq 0 && exec $0 -help

case "$1" in
     h*)  # Assume help
      exec $0 -help
      ;;
    -h*)  # Differs from standard help
    cat <<===Help
Usage: $pgm center-position [other-options]
   or  $pgm Jhhmmss.ss+ddmmss.s    [other-options]
   or  $pgm -i SDSS-identification [other-options]
   or  $pgm -f [file_with_centers] [other_options]
   or  $pgm - [other_options]      (data in stdin)
--------------------------------------------------------------------
 Several SDSS-identifications may be   Jhhmmss.ss+ddmmss.s
   or   19-digit number           or   run-rerun-camcol-field-obj
   or   plate-mjd-fiber           or   run-camcol-field-obj
--------------------------------------------------------------------
===Help
    exec $D_BIN/find_gen $pgm $rpc -rhelp
    ;;

  # Use the generic find_gen service
  *)
    exec $D_BIN/find_gen $pgm $rpc "$@"
    ;;
esac
