summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <basile@opensource.dyc.edu>2010-07-10 21:01:22 -0400
committerAnthony G. Basile <basile@opensource.dyc.edu>2010-07-10 21:01:22 -0400
commitdd57027d6b9232e6b84b2c0285d83fdcbce41257 (patch)
treec5c14e8800e7d715a31bab2626c9f550944b7343
parentNo longer supporting 2.6.28 and 2.6.33 (diff)
downloadhardened-patchset-dd57027d6b9232e6b84b2c0285d83fdcbce41257.tar.gz
hardened-patchset-dd57027d6b9232e6b84b2c0285d83fdcbce41257.tar.bz2
hardened-patchset-dd57027d6b9232e6b84b2c0285d83fdcbce41257.zip
Adding patch making script
-rwxr-xr-xmk.patch.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/mk.patch.sh b/mk.patch.sh
new file mode 100755
index 0000000..2e2d4bd
--- /dev/null
+++ b/mk.patch.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+SCRIPT_NAME="${0}"
+KERNEL_VER="${1%/}"
+HGPV_PATCH="${2}"
+TAR="/bin/tar"
+
+################################################################################
+
+die() {
+ echo "$1"
+ exit
+}
+
+sanity() {
+ [[ -d "${KERNEL_VER}" ]] || die "Can't find ${KERNEL_VER} directory"
+ [[ -e "${TAR}" ]] || die "Can't find tar"
+ [[ -n "${HGPV_PATCH}" ]] || die "No HGPV patchlevel given"
+}
+
+################################################################################
+
+sanity
+
+HGPV="${KERNEL_VER}-${HGPV_PATCH}"
+HGPV_TARBALL="hardened-patches-${HGPV}.extras.tar.bz2"
+
+tar jcvf ${HGPV_TARBALL} ${KERNEL_VER}
+