From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-patchset:master commit in: scripts/
Date: Sat, 14 May 2016 13:28:39 +0000 (UTC) [thread overview]
Message-ID: <1463232581.a54d71c671e6d944bc4c4c5d9f415e734f1494fc.blueness@gentoo> (raw)
commit: a54d71c671e6d944bc4c4c5d9f415e734f1494fc
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat May 14 13:29:41 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat May 14 13:29:41 2016 +0000
URL: https://gitweb.gentoo.org/proj/hardened-patchset.git/commit/?id=a54d71c6
scripts: intelligently obtain KMAJOR
scripts/ap.patch.sh | 11 ++++-------
scripts/re.patch.sh | 11 ++++-------
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/scripts/ap.patch.sh b/scripts/ap.patch.sh
index 9ad2c24..19c4bb3 100755
--- a/scripts/ap.patch.sh
+++ b/scripts/ap.patch.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-SCRIPT="${0}"
-KMAJOR="${1}"
+SCRIPT="$0"
+KMAJOR="$1"
+DIRVER="$(basename $(pwd) | sed -e 's/linux-//' -e 's/-hardened.*//')"
+: ${KMAJOR:=$DIRVER}
PATCHSET="/root/hardened-patchset/${KMAJOR}"
-if [[ -z "${KMAJOR}" ]] ; then
- echo "Usage: ${SCRIPT} <kernel_major>"
- exit
-fi
-
if [[ ! -d ${PATCHSET} ]] ; then
echo "Patchset ${KMAJOR} doesn't exist"
exit
diff --git a/scripts/re.patch.sh b/scripts/re.patch.sh
index d1ac153..0daafc3 100755
--- a/scripts/re.patch.sh
+++ b/scripts/re.patch.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-SCRIPT="${0}"
-KMAJOR="${1}"
+SCRIPT="$0"
+KMAJOR="$1"
+DIRVER="$(basename $(pwd) | sed -e 's/linux-//' -e 's/-hardened.*//')"
+: ${KMAJOR:=$DIRVER}
PATCHSET="/root/hardened-patchset/${KMAJOR}"
-if [[ -z "${KMAJOR}" ]] ; then
- echo "Usage: ${SCRIPT} <kernel_major>"
- exit
-fi
-
if [[ ! -d ${PATCHSET} ]] ; then
echo "Patchset ${KMAJOR} doesn't exist"
exit
next reply other threads:[~2016-05-14 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-14 13:28 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-04-21 7:16 [gentoo-commits] proj/hardened-patchset:master commit in: scripts/ Anthony G. Basile
2012-10-13 8:27 Anthony G. Basile
2012-03-26 10:53 Anthony G. Basile
2012-02-25 17:30 Anthony G. Basile
2011-05-26 10:26 Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463232581.a54d71c671e6d944bc4c4c5d9f415e734f1494fc.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox