#!/bin/bash

########################################################################
#                          ALLPROGS                                    #
#                                                                      #
# This shell scripts prints a brief description of all programs.       #
#                                                                      #
# HDM 4/04                                                             #
########################################################################

if [ "$1" = "-h" ] ; then
    echo '------------------------------------------------------------------'
    echo 'Purpose:  Provide an overview over all compiled programs.'
    echo 'Usage  :  allprogs [ -h ] [ ext ]'
    echo 'Options: -h : print this help text.'
    echo 'The (optional) extension "ext" may be used to check for'
    echo "programs like mctdh${MCTDH_VERSION}d or mctdh${MCTDH_VERSION}.g77"
    echo "It is recommended to pipe the output to less."
    echo '------------------------------------------------------------------'
    exit
fi 	

cd $MCTDH_DIR/bin/binary/$MCTDH_PLATFORM
list=`ls *$MCTDH_VERSION$1`

for i in $list ; do
   echo ; echo
   echo "  ############  $i  ################# "
   $i -h
done
exit
