diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-07-18 21:52:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-07-18 21:52:39 +0000 |
commit | d974829968d41bac703636e5679a1faffb96591b (patch) | |
tree | caea190feebcd9452fa1d634a60e05da8508cdaf /net-misc | |
parent | Stable for PPC (bug #323385). (diff) | |
download | gentoo-2-d974829968d41bac703636e5679a1faffb96591b.tar.gz gentoo-2-d974829968d41bac703636e5679a1faffb96591b.tar.bz2 gentoo-2-d974829968d41bac703636e5679a1faffb96591b.zip |
scan ebuilds for automatic versions
Diffstat (limited to 'net-misc')
-rwxr-xr-x | net-misc/ntp/files/man-pages/genmans.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net-misc/ntp/files/man-pages/genmans.sh b/net-misc/ntp/files/man-pages/genmans.sh index 843db64fa096..78b0a00573b5 100755 --- a/net-misc/ntp/files/man-pages/genmans.sh +++ b/net-misc/ntp/files/man-pages/genmans.sh @@ -5,10 +5,13 @@ VERSION=$1 if [[ -z ${VERSION} ]] ; then - VERSION=$(ls -1d ntp-*/ | LC_COLLATE=C sort | sed -n '${s:/::;p;Q}') + VERSION=$(ls -1d ntp-*/ 2>/dev/null | LC_COLLATE=C sort | sed -n '${s:/::;p;Q}') if [[ -z ${VERSION} ]] ; then - echo "Usage: $0 <version>" - exit 1 + VERSION=$(ls "${0%/*}"/../../ntp-*.ebuild | LC_COLLATE=C sort | sed -n '${s:.*/::;s:_::;s:[.]ebuild::;p;Q}') + if [[ -z ${VERSION} ]] ; then + echo "Usage: $0 <version>" + exit 1 + fi fi fi [[ ${VERSION} != ntp-* ]] && VERSION="ntp-${VERSION}" |