Skip to content

Commit

Permalink
fix(Help): show only CLI basename on help message
Browse files Browse the repository at this point in the history
fix #3
  • Loading branch information
fjcaetano committed Sep 27, 2019
1 parent c56415e commit fe36eb5
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions bin/ios-simulator-gif
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,19 @@ parse_args() {
# The command line help #
#########################
display_help() {
echo "Usage: $0 [options] {out_file} {-- [ffmpeg options]}" >&2
echo
echo " out_file The output file name (default: simulator.gif)"
echo " ffmpeg options Pass everything after '--' to ffmpeg as arguments"
echo
echo " -r, --rate Framerate of the output (default: 6)"
echo " -f, --format Output format (default: gif)"
echo " -vf, --video-filter Video filter for ffmpeg (default: scale=320:-1)"
echo " -h, --help Outputs this help message"
echo
exit 0
CMD=$(basename -- $0)

echo "Usage: $CMD [options] {out_file} {-- [ffmpeg options]}" >&2
echo
echo " out_file The output file name (default: simulator.gif)"
echo " ffmpeg options Pass everything after '--' to ffmpeg as arguments"
echo
echo " -r, --rate Framerate of the output (default: 6)"
echo " -f, --format Output format (default: gif)"
echo " -vf, --video-filter Video filter for ffmpeg (default: scale=320:-1)"
echo " -h, --help Outputs this help message"
echo
exit 0
}

main "$@"

0 comments on commit fe36eb5

Please sign in to comment.