Mercurial > hg
comparison contrib/buildrpm @ 7431:3d827cc616b6
buildrpm: complain when hg command isn't available
Before it complained "You are not inside a Mercurial repository!" which wasn't true.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 27 Nov 2008 01:09:11 +0100 |
parents | 3e000e2bf5f6 |
children | ff817723280a |
comparison
equal
deleted
inserted
replaced
7430:f0a3e87c810d | 7431:3d827cc616b6 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # | 2 # |
3 # Build a Mercurial RPM in place. | 3 # Build a Mercurial RPM in place. |
4 # Known to work on: | 4 # Known to work on: |
5 # - Fedora 9 | 5 # - Fedora 9 |
6 # - Fedora 10 | |
6 # | 7 # |
7 # Bryan O'Sullivan <bos@serpentine.com> | 8 # Bryan O'Sullivan <bos@serpentine.com> |
9 | |
10 if hg --version > /dev/null 2>&1; then : | |
11 else | |
12 echo 'hg command not available!' 1>&2 | |
13 exit 1 | |
14 fi | |
8 | 15 |
9 root="`hg root 2>/dev/null`" | 16 root="`hg root 2>/dev/null`" |
10 specfile=contrib/mercurial.spec | 17 specfile=contrib/mercurial.spec |
11 | 18 |
12 if [ -z "$root" ]; then | 19 if [ -z "$root" ]; then |