summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-07-18 21:52:39 +0000
committerMike Frysinger <vapier@gentoo.org>2010-07-18 21:52:39 +0000
commitd974829968d41bac703636e5679a1faffb96591b (patch)
treecaea190feebcd9452fa1d634a60e05da8508cdaf /net-misc
parentStable for PPC (bug #323385). (diff)
downloadgentoo-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-xnet-misc/ntp/files/man-pages/genmans.sh9
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}"