Browse Source

* improved `sde help` to ignore bin/sde-*-* which are internal tools

git-svn-id: svn://svn.opensde.net/opensde/opensde/trunk@21665 10447126-35f2-4685-b0cf-6dd780d3921f
misl/sde-wrapper
Alejandro Mery 17 years ago
parent
commit
1ad65b0704
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      bin/sde-help

+ 10
- 1
bin/sde-help

@ -30,7 +30,12 @@ help_list() {
echo "Available Commands:"
for command in $SDEROOT/bin/sde-*; do
# detect command name
id=$( echo "$command" | sed -e 's,.*/sde-,,' )
case "$command" in
*/sde-*-*) continue ;;
*/sde-*) id=$( echo "$command" | sed -e 's,.*/sde-,,' )
;;
esac
# optional description
desc=$( sed -n -e 's,^#Description: \(.*\)$,\1,p' "$command" )
# and valid aliases
@ -61,6 +66,10 @@ elif [ $# -gt 1 ]; then
echo_error "Incorrect Syntax."
help_usage
exit 1
elif [ "$1" != "${1%-*}" ]; then
# don't accept subcommands
echo_error "Incorrect Syntax."
help_usage
elif [ -x "$SDEROOT/bin/sde-$1" ]; then
help_command "$1"
elif grep -q "^#Alias: $1$" $SDEROOT/bin/sde-* 2> /dev/null; then

Loading…
Cancel
Save