add star case to getopts

master
Greg Gauthier 5 months ago
parent 657766ca06
commit 6f4562fff0
  1. 10
      new

10
new

@ -10,9 +10,9 @@ Help()
echo
echo "Syntax: new -c contentType -t 'some title'"
echo "options:"
echo "c Content Type: 'post', 'podcast', 'reading'"
echo "t Content Title: \"Any Plain Text At All\""
echo "h This display."
echo "-c [required] Content Type: 'post', 'podcast', 'reading'"
echo "-t [required] Content Title: \"Any Plain Text At All\""
echo "-h This display."
exit 0
}
@ -21,7 +21,9 @@ do
case "${flag}" in
c) contentType=${OPTARG};;
t) title=${OPTARG};;
h) Help
h) Help;;
*) echo "-h for help" >&2
exit 1 ;;
esac
done

Loading…
Cancel
Save