|
179 | 179 |
|
180 | 180 | Options: |
181 | 181 | * --pre-format-files <src> <dst> |
182 | | - copies the src to the dst on the VM, before disko is run |
| 182 | + copies the content of path <src> to path <dst> on the VM, before disko is run |
183 | 183 | This is useful to provide secrets like LUKS keys, or other files you need for formatting |
184 | 184 | * --post-format-files <src> <dst> |
185 | | - copies the src to the dst on the finished image |
| 185 | + copies the content of path <src> to path <dst> on the finished image |
186 | 186 | These end up in the images later and is useful if you want to add some extra stateful files |
187 | 187 | They will have the same permissions but will be owned by root:root |
188 | 188 | * --build-memory <amt> |
189 | 189 | specify the amount of memory in MiB that gets allocated to the build VM |
190 | | - This can be useful if you want to build images with a more involed NixOS config |
| 190 | + This can be useful if you want to build images with a more involved NixOS config |
191 | 191 | The default is disko.memSize which defaults to ${builtins.toString options.disko.memSize.default} MiB |
192 | 192 | USAGE |
193 | 193 | } |
|
207 | 207 | --pre-format-files) |
208 | 208 | src=$2 |
209 | 209 | dst=$3 |
210 | | - cp --reflink=auto -r "$src" copy_before_disko/"$(echo "$dst" | base64)" |
| 210 | + cp --reflink=auto -rv "$src" copy_before_disko/"$(echo "$dst" | base64)" |
211 | 211 | shift 2 |
212 | 212 | ;; |
213 | 213 | --post-format-files) |
214 | 214 | src=$2 |
215 | 215 | dst=$3 |
216 | | - cp --reflink=auto -r "$src" copy_after_disko/"$(echo "$dst" | base64)" |
| 216 | + cp --reflink=auto -rv "$src" copy_after_disko/"$(echo "$dst" | base64)" |
217 | 217 | shift 2 |
218 | 218 | ;; |
219 | 219 | --build-memory) |
|
243 | 243 | for src in /tmp/xchg/copy_before_disko/*; do |
244 | 244 | [ -e "$src" ] || continue |
245 | 245 | dst=$(basename "$src" | base64 -d) |
246 | | - mkdir -p "$(dirname "$dst")" |
247 | | - cp -r "$src" "$dst" |
| 246 | + mkdir -p "$dst" |
| 247 | + cp -rv "$src"/. "$dst" |
248 | 248 | done |
249 | 249 | set -f |
250 | 250 | ${partitioner} |
251 | 251 | set +f |
252 | 252 | for src in /tmp/xchg/copy_after_disko/*; do |
253 | 253 | [ -e "$src" ] || continue |
254 | 254 | dst=/mnt/$(basename "$src" | base64 -d) |
255 | | - mkdir -p "$(dirname "$dst")" |
256 | | - cp -r "$src" "$dst" |
| 255 | + mkdir -p "$dst" |
| 256 | + cp -rv "$src"/. "$dst" |
257 | 257 | done |
258 | 258 | ${installer} |
259 | 259 | ''} |
|
0 commit comments