diff options
Diffstat (limited to 'src/xorriso-usb.sh')
-rw-r--r-- | src/xorriso-usb.sh | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/src/xorriso-usb.sh b/src/xorriso-usb.sh index 0adbb70..7017447 100644 --- a/src/xorriso-usb.sh +++ b/src/xorriso-usb.sh | |||
@@ -80,26 +80,41 @@ try_mount() | |||
80 | mount -r "$1" /mnt && trap 'umount -l /mnt' EXIT | 80 | mount -r "$1" /mnt && trap 'umount -l /mnt' EXIT |
81 | } | 81 | } |
82 | 82 | ||
83 | verbosely() | ||
84 | { | ||
85 | (set -x; "$@") | ||
86 | } | ||
87 | |||
83 | xorriso_cmd() | 88 | xorriso_cmd() |
84 | { | 89 | { |
85 | # input variables: | 90 | # input variables: |
86 | 91 | ||
87 | # INPUT_DEVICE | 92 | ## that do not affect the output ISO image: |
88 | # NEED_STDIO | 93 | |
94 | # SHOW_XORRISO_CMD | ||
89 | # SILENT | 95 | # SILENT |
96 | # NEED_STDIO | ||
97 | |||
98 | ## that do not vary by invocation: | ||
99 | |||
90 | # volid | 100 | # volid |
91 | # INPUT_DEVICE_COPIES | ||
92 | # REMOVE_BTRFS | ||
93 | # ADD_BTRFS | ||
94 | # vmlinuz_dir | 101 | # vmlinuz_dir |
102 | # efi_dir | ||
95 | # gpg_iso_path | 103 | # gpg_iso_path |
104 | |||
105 | ## that specify sources of input: | ||
106 | |||
107 | # INPUT_DEVICE | ||
96 | # gnupghome | 108 | # gnupghome |
97 | # efi_dir | 109 | # $@ (btrfs filesystems) |
110 | # INPUT_DEVICE_COPIES | ||
111 | |||
112 | ## boolean flags | ||
98 | 113 | ||
99 | # $@ = btrfs filesystems | 114 | # REMOVE_BTRFS |
115 | # ADD_BTRFS | ||
100 | 116 | ||
101 | ([ "$SHOW_CMD" ] && set -x; | 117 | ${SHOW_XORRISO_CMD:+ verbosely} ${NO_ACT:+ :} \ |
102 | ${NO_ACT:+ :} \ | ||
103 | xorriso \ | 118 | xorriso \ |
104 | ${INPUT_DEVICE:+ -indev "$INPUT_DEVICE" } \ | 119 | ${INPUT_DEVICE:+ -indev "$INPUT_DEVICE" } \ |
105 | -outdev ${NEED_STDIO:+stdio:}"$outdev" \ | 120 | -outdev ${NEED_STDIO:+stdio:}"$outdev" \ |
@@ -133,7 +148,6 @@ xorriso_cmd() | |||
133 | --embedded-boot "${efi_dir}"/embedded.img \ | 148 | --embedded-boot "${efi_dir}"/embedded.img \ |
134 | --protective-msdos-label \ | 149 | --protective-msdos-label \ |
135 | grub="${efi_dir}"/grub | 150 | grub="${efi_dir}"/grub |
136 | ) | ||
137 | } | 151 | } |
138 | 152 | ||
139 | run_xorriso() | 153 | run_xorriso() |
@@ -266,6 +280,6 @@ if [ "$REPLACE_INITRD" ]; then | |||
266 | fi | 280 | fi |
267 | 281 | ||
268 | SILENT= | 282 | SILENT= |
269 | SHOW_CMD=y | 283 | SHOW_XORRISO_CMD=y |
270 | 284 | ||
271 | run_xorriso "$@" | 285 | run_xorriso "$@" |