summaryrefslogtreecommitdiff
path: root/initrd.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-29 14:36:26 -0400
committerAndrew Cady <d@jerkface.net>2016-04-29 14:36:30 -0400
commit153d299a41b9be4e15dab1ca29bb93a74bd2445d (patch)
tree96fbfbe7c64f0b3f02f3d755e2b129917785bb98 /initrd.sh
parent5f41fb879ca830e5ad3345878e59072f3d6573bc (diff)
fix paths (in progress)
Diffstat (limited to 'initrd.sh')
-rwxr-xr-xinitrd.sh36
1 files changed, 0 insertions, 36 deletions
diff --git a/initrd.sh b/initrd.sh
deleted file mode 100755
index 252763b..0000000
--- a/initrd.sh
+++ /dev/null
@@ -1,36 +0,0 @@
1#!/bin/sh
2
3initrd=isolinux/linux/initrd.img
4vmlinuz=isolinux/linux/vmlinuz
5
6version=$(uname -r)
7version=4.5.0-0.bpo.1-amd64
8conf_dir=initramfs-tools
9
10apt_dependencies=initrd-dependencies.txt
11
12find_source_dirs() {
13 set -- find "$conf_dir" ./old-school "$@"
14 "$@"
15}
16
17force_rebuild()
18{
19 touch "$conf_dir"
20 return 1
21}
22
23rebuild()
24{
25 [ ! -f "$apt_dependencies" ] || sudo apt-get install -q=10 --no-upgrade -y $(cat "$apt_dependencies")
26
27 set -ex
28 cp -f /boot/vmlinuz-${version} "$vmlinuz"
29 /usr/sbin/mkinitramfs -d "$conf_dir" -o "$initrd" ${version} || force_rebuild
30}
31
32if [ ! -e "$initrd" -o ! -e "$vmlinuz" ]; then
33 rebuild
34elif [ "$(find_source_dirs -newer "$initrd" -print -quit)" ]; then
35 rebuild
36fi