summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rwxr-xr-xsrc/initrd.sh11
2 files changed, 13 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 4f75fe9..5596f5d 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,8 @@ install-submodules-stamp: install-submodules
105install-bin-programs: ${bin_programs} 105install-bin-programs: ${bin_programs}
106 install -p ${bin_programs} ${instdir}${samizdat_bindir} 106 install -p ${bin_programs} ${instdir}${samizdat_bindir}
107 107
108CP=cp --preserve=timestamps -r
109
108install-stamp: install-bin-programs samizdat-paths.sh ${compiled_programs} 110install-stamp: install-bin-programs samizdat-paths.sh ${compiled_programs}
109 mkdir -p ${instdir}${samizdat_initrd_files_dir} 111 mkdir -p ${instdir}${samizdat_initrd_files_dir}
110 mkdir -p ${instdir}${samizdat_child_dir} 112 mkdir -p ${instdir}${samizdat_child_dir}
@@ -112,7 +114,7 @@ install-stamp: install-bin-programs samizdat-paths.sh ${compiled_programs}
112 mkdir -p ${instdir}${samizdat_initramfs_conf_dir} 114 mkdir -p ${instdir}${samizdat_initramfs_conf_dir}
113 mkdir -p ${instdir}${samizdat_isolinux_dir} 115 mkdir -p ${instdir}${samizdat_isolinux_dir}
114 mkdir -p ${instdir}${samizdat_linux_dir} 116 mkdir -p ${instdir}${samizdat_linux_dir}
115 cp -r ${initrd_files} ${instdir}${samizdat_initrd_files_dir} 117 $(CP) ${initrd_files} ${instdir}${samizdat_initrd_files_dir}
116 cp -r ${initramfs_conf_files} ${instdir}${samizdat_initramfs_conf_dir} 118 $(CP) ${initramfs_conf_files} ${instdir}${samizdat_initramfs_conf_dir}
117 cp -r ${isolinux_files} ${instdir}${samizdat_isolinux_dir} 119 $(CP) ${isolinux_files} ${instdir}${samizdat_isolinux_dir}
118 touch $@ 120 touch $@
diff --git a/src/initrd.sh b/src/initrd.sh
index b99aa4e..1414c89 100755
--- a/src/initrd.sh
+++ b/src/initrd.sh
@@ -19,7 +19,8 @@ force_rebuild()
19 19
20rebuild() 20rebuild()
21{ 21{
22 [ ! -f "$apt_dependencies" ] || sudo apt-get install -q=10 --no-upgrade -y $(cat "$apt_dependencies") 22 [ ! -f "$apt_dependencies" ] ||
23 sudo apt-get install -q=10 --no-upgrade -y $(cat "$apt_dependencies")
23 24
24 set -ex 25 set -ex
25 cp -f /boot/vmlinuz-"${kernel_version}" "$vmlinuz" 26 cp -f /boot/vmlinuz-"${kernel_version}" "$vmlinuz"
@@ -30,6 +31,10 @@ rebuild()
30 31
31if [ ! -e "$initrd" -o ! -e "$vmlinuz" ]; then 32if [ ! -e "$initrd" -o ! -e "$vmlinuz" ]; then
32 rebuild 33 rebuild
33elif [ "$(find_source_dirs -newer "$initrd" -print -quit)" ]; then 34else
34 rebuild 35 found=$(find_source_dirs -newer "$initrd" -print -quit)
36 if [ "$found" ]; then
37 echo "initrd.sh: rebuild forced: found modified source: $found"
38 rebuild
39 fi
35fi 40fi