summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-12-28 15:53:55 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2017-12-28 15:53:55 +0000
commit4c57e52f691ac2647d4f11e56431977212d34182 (patch)
tree56304a2ed57f244a65fabf22a3a17b37336b4b6c
parentrip-headers.sh: try DISTDIR from portage before falling back to /usr/portage (diff)
downloadlinux-headers-patches-4c57e52f691ac2647d4f11e56431977212d34182.tar.gz
linux-headers-patches-4c57e52f691ac2647d4f11e56431977212d34182.tar.bz2
linux-headers-patches-4c57e52f691ac2647d4f11e56431977212d34182.zip
rip-headers.sh: add tiny 'usage' banner
-rwxr-xr-xrip-headers.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/rip-headers.sh b/rip-headers.sh
index 0558ec3..10b2930 100755
--- a/rip-headers.sh
+++ b/rip-headers.sh
@@ -1,7 +1,10 @@
#!/bin/bash -ex
ver=$1
-[[ -z $ver ]] && exit 1
+if [[ -z $ver ]]; then
+ echo "Usage: $0 <kernel ver>"
+ exit 1
+fi
[[ ${ver} == linux-* ]] && ver=${ver#linux-}
ver=${ver%/}