Factor them in own variables to avoid repeating them in following
commits.
This is just refactoring, no behaviour changes.
---
src/mode_build.ml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/mode_build.ml b/src/mode_build.ml
index 8a06012..d54a3cd 100644
--- a/src/mode_build.ml
+++ b/src/mode_build.ml
@@ -59,6 +59,10 @@ and string_of_file_content = function
| Excludefiles -> "excludefiles"
| Empty -> "empty"
+let kernel_filename = "kernel"
+and appliance_filename = "root"
+and initrd_filename = "initrd"
+
let rec build debug
(copy_kernel, format, host_cpu,
packager_config, tmpdir, use_installed, size,
@@ -223,9 +227,9 @@ let rec build debug
Format_chroot.build_chroot debug files outputdir packagelist_file
| Ext2 ->
- let kernel = outputdir // "kernel"
- and appliance = outputdir // "root"
- and initrd = outputdir // "initrd" in
+ let kernel = outputdir // kernel_filename
+ and appliance = outputdir // appliance_filename
+ and initrd = outputdir // initrd_filename in
let kernel_version, modpath =
Format_ext2_kernel.build_kernel debug host_cpu copy_kernel kernel in
Format_ext2.build_ext2 debug basedir files modpath kernel_version
--
2.25.1