diff options
author | Thomas Haller <thaller@redhat.com> | 2014-06-18 10:49:51 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-18 10:49:51 +0200 |
commit | bf0b08ad55cb644b1821d950ce8e631b05215e35 (patch) | |
tree | bfb2f8ba6ba5f45a606b1296ad77feeca6d0fded | |
parent | 02747203c6212b0a35e86f4a3b21a0d632b78afc (diff) | |
download | NetworkManager-bf0b08ad55cb644b1821d950ce8e631b05215e35.tar.gz |
contrib/rpm: improve usage output of build_clean.sh script
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rwxr-xr-x | contrib/fedora/rpm/build_clean.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/fedora/rpm/build_clean.sh b/contrib/fedora/rpm/build_clean.sh index af3465fe41..f14f55f923 100755 --- a/contrib/fedora/rpm/build_clean.sh +++ b/contrib/fedora/rpm/build_clean.sh @@ -7,10 +7,13 @@ die() { } usage() { - echo "USAGE: $0 [-h|--help|-?|help]" + echo "USAGE: $0 [-h|--help|-?|help] [-f|--force] [-c|--clean]" echo echo "Does all the steps from a clean working directory to an RPM of NetworkManager" echo + echo "Options:" + echo " --force: force build, even if working directory is not clean and has local modifications" + echo " --clean: run \`git-clean -fdx :/\` before build" } @@ -53,11 +56,11 @@ if [[ $IGNORE_DIRTY != 1 ]]; then # check for a clean working directory. # We ignore the /contrib directory, because this is where the automation # scripts and the build results will be. - if [[ "x$(git clean -ndx | grep '^Would remove contrib/.*$' -v)" != x ]]; then - die "The working directory is not clean. Refuse to run. Try git clean -e /contrib -dx -n" + if [[ "x$(LANG=C git clean -ndx | grep '^Would remove contrib/.*$' -v)" != x ]]; then + die "The working directory is not clean. Refuse to run. Try \`$0 --force\`, \`$0 --clean\`, or \`git clean -e :/contrib -dx -n\`" fi if [[ "x$(git status --porcelain)" != x ]]; then - die "The working directory has local changes. Refuse to run. Try $0 --force" + die "The working directory has local changes. Refuse to run. Try \`$0 --force\`" fi fi |