Skip to content

Commit

Permalink
Fix --help formating internetguru#64
Browse files Browse the repository at this point in the history
  • Loading branch information
travis committed Apr 10, 2017
1 parent 1c62635 commit 72a8cc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ addons:
sources:
- debian-sid # Needed for shellcheck
packages:
- man
- shellcheck
- python-docutils # Needed for rst2man

Expand All @@ -23,6 +24,12 @@ env:
- DIST=single DEPLOY_FILE=omgf.sh

before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ls -la /bin
ls -la /usr/bin
ls -la /usr/local/bin
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
Expand Down Expand Up @@ -62,7 +69,7 @@ before_script:
script:
- shellcheck omgf
- butt test/test.butt
- butt -v test/test.butt

deploy:
- provider: releases
Expand Down
10 changes: 5 additions & 5 deletions omgf
Original file line number Diff line number Diff line change
Expand Up @@ -1005,11 +1005,11 @@ function main {
[ -f "$usage_file" ] \
|| err "Usage file not found" \
|| return 1
first_line="$(head -n -1 "$usage_file")"
other_content="$(tail -n +2 "$usage_file")"
first_line="$(head -n1 "$usage_file")"
other_content="$(tail -n+2 "$usage_file")"
else
first_line="$(echo "$OMGF_USAGE" | head -n -1)"
other_content="$(echo "$OMGF_USAGE" | tail -n +2)"
first_line="$(echo "$OMGF_USAGE" | head -n1)"
other_content="$(echo "$OMGF_USAGE" | tail -n+2)"
fi
echo "$first_line"
echo
Expand Down Expand Up @@ -1137,7 +1137,7 @@ function main {
-h|-\?|--help) gf_usage; return $? ;;
-i|--init) init=1; conform=1; shift ;;
-n|--dry-run) dry=1; shift ;;
-r|--request) request=1; shift;;
-r|--request) request=1; shift ;;
-v|--verbose) verbose=1; shift ;;
-V|--version) gf_version; return $? ;;
-w|--what-now) what_now=1; shift ;;
Expand Down

0 comments on commit 72a8cc8

Please sign in to comment.