diff options
author | Andrew Cady <d@jerkface.net> | 2016-04-29 14:36:26 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2016-04-29 14:36:30 -0400 |
commit | 153d299a41b9be4e15dab1ca29bb93a74bd2445d (patch) | |
tree | 96fbfbe7c64f0b3f02f3d755e2b129917785bb98 /initrd.sh | |
parent | 5f41fb879ca830e5ad3345878e59072f3d6573bc (diff) |
fix paths (in progress)
Diffstat (limited to 'initrd.sh')
-rwxr-xr-x | initrd.sh | 36 |
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 | |||
3 | initrd=isolinux/linux/initrd.img | ||
4 | vmlinuz=isolinux/linux/vmlinuz | ||
5 | |||
6 | version=$(uname -r) | ||
7 | version=4.5.0-0.bpo.1-amd64 | ||
8 | conf_dir=initramfs-tools | ||
9 | |||
10 | apt_dependencies=initrd-dependencies.txt | ||
11 | |||
12 | find_source_dirs() { | ||
13 | set -- find "$conf_dir" ./old-school "$@" | ||
14 | "$@" | ||
15 | } | ||
16 | |||
17 | force_rebuild() | ||
18 | { | ||
19 | touch "$conf_dir" | ||
20 | return 1 | ||
21 | } | ||
22 | |||
23 | rebuild() | ||
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 | |||
32 | if [ ! -e "$initrd" -o ! -e "$vmlinuz" ]; then | ||
33 | rebuild | ||
34 | elif [ "$(find_source_dirs -newer "$initrd" -print -quit)" ]; then | ||
35 | rebuild | ||
36 | fi | ||