From fe36eb5d8a7058d7683934cff16446c44aec31c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Caetano?= Date: Fri, 27 Sep 2019 15:22:42 -0300 Subject: [PATCH] fix(Help): show only CLI basename on help message fix #3 --- bin/ios-simulator-gif | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/bin/ios-simulator-gif b/bin/ios-simulator-gif index d0d1fc4..6dc07d9 100755 --- a/bin/ios-simulator-gif +++ b/bin/ios-simulator-gif @@ -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 "$@" \ No newline at end of file