From eefbd029b55b2782b0d7b11b4989ce0ca9b256cd Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Tue, 15 Oct 2019 20:56:41 -0400 Subject: Massive organization of my dotfiles --- linux/kernel/package.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 linux/kernel/package.sh (limited to 'linux/kernel/package.sh') diff --git a/linux/kernel/package.sh b/linux/kernel/package.sh new file mode 100755 index 0000000..14a23b2 --- /dev/null +++ b/linux/kernel/package.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -e +set -x + +if [ $(id -u) -ne 0 ] ; then + echo "You must be root" + exit 1; +fi + +if [ -z "$1" ] ; then + echo "Usage: $0 \$version" + echo "Will place currently installed kernel \$version in the current directory" + exit 1; +fi +version="$1"; shift + +tar -C / -cvf - \ + "/usr/lib/modules/$version" \ + "/boot/config-$version" \ + "/boot/vmlinuz-$version" \ + "/boot/System.map-${version}" \ + "/boot/initramfs-${version}.img" \ + | gzip -3c > $version.tar.gz -- cgit v1.2.3