|
1 | 1 | #!/bin/sh
|
| 2 | +# |
| 3 | +# Copyright (c) 2023, 2024 Mattie Behrens. |
| 4 | +# |
| 5 | +# Permission is hereby granted, free of charge, to any person obtaining |
| 6 | +# a copy of this software and associated documentation files (the |
| 7 | +# "Software"), to deal in the Software without restriction, including |
| 8 | +# without limitation the rights to use, copy, modify, merge, publish, |
| 9 | +# distribute, sublicense, and/or sell copies of the Software, and to |
| 10 | +# permit persons to whom the Software is furnished to do so, subject |
| 11 | +# to the following conditions: |
| 12 | +# |
| 13 | +# The above copyright notice and this permission notice shall be |
| 14 | +# included in all copies or substantial portions of the Software. |
| 15 | +# |
| 16 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 17 | +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 | +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 19 | +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR |
| 20 | +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF |
| 21 | +# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 22 | +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 23 | +# |
2 | 24 |
|
3 | 25 | # Color support from portable-color <https://mattiebee.dev/portable-color>
|
4 | 26 |
|
@@ -77,20 +99,31 @@ print_subtask "Exporting image 1"
|
77 | 99 | wimapply "${esd}" 1 "${tmpdir}"
|
78 | 100 |
|
79 | 101 | print_subtask "Exporting image 2"
|
80 |
| -wimexport "${esd}" 2 "${tmpdir}/sources/boot.wim" --compress=LZX --chunk-size=32K |
| 102 | +wimexport "${esd}" 2 \ |
| 103 | + "${tmpdir}/sources/boot.wim" \ |
| 104 | + --compress=LZX --chunk-size=32K |
81 | 105 |
|
82 | 106 | print_subtask "Exporting image 3"
|
83 |
| -wimexport "${esd}" 3 "${tmpdir}/sources/boot.wim" --compress=LZX --chunk-size=32K --boot |
| 107 | +wimexport "${esd}" 3 \ |
| 108 | + "${tmpdir}/sources/boot.wim" \ |
| 109 | + --compress=LZX --chunk-size=32K --boot |
84 | 110 |
|
85 |
| -for index in $(seq 4 "${image_count}") |
86 |
| -do |
| 111 | +for index in $(seq 4 "${image_count}"); do |
87 | 112 | print_subtask "Exporting image ${index}"
|
88 |
| - wimexport "${esd}" "${index}" "${tmpdir}/sources/install.esd" --compress=LZMS --chunk-size 128K --recompress |
| 113 | + wimexport "${esd}" "${index}" \ |
| 114 | + "${tmpdir}/sources/install.esd" \ |
| 115 | + --compress=LZMS --chunk-size 128K --recompress |
89 | 116 | done
|
90 | 117 |
|
91 | 118 | basename="$(basename "${esd}" .esd)"
|
92 | 119 | iso="${basename}.iso"
|
93 | 120 |
|
94 | 121 | rm -f "${iso}"
|
95 | 122 | print_task "Creating ${iso}"
|
96 |
| -hdiutil makehybrid -o "${iso}" -iso -udf -hard-disk-boot -eltorito-boot "${tmpdir}/efi/microsoft/boot/efisys.bin" -iso-volume-name ESD_ISO -udf-volume-name ESD-ISO "${tmpdir}" |
| 123 | +hdiutil makehybrid \ |
| 124 | + -o "${iso}" \ |
| 125 | + -iso -udf \ |
| 126 | + -hard-disk-boot -eltorito-boot "${tmpdir}/efi/microsoft/boot/efisys.bin" \ |
| 127 | + -iso-volume-name ESD_ISO \ |
| 128 | + -udf-volume-name ESD-ISO \ |
| 129 | + "${tmpdir}" |
0 commit comments