summaryrefslogtreecommitdiff
path: root/src/xorriso-usb.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2017-03-31 13:26:45 -0400
committerAndrew Cady <d@jerkface.net>2017-03-31 13:26:45 -0400
commit662e3e15f6aa20c7f9b1dc8d6e28eb70c16a5bfa (patch)
treea4f2ec570a94129a75a1b0d11a89beef8666d34a /src/xorriso-usb.sh
parent3d86948e3c7bfcb96085c819e31f9ef5925e944d (diff)
xorriso-usb: cleanup/reorg that should not affect behavior
Diffstat (limited to 'src/xorriso-usb.sh')
-rw-r--r--src/xorriso-usb.sh36
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
83verbosely()
84{
85 (set -x; "$@")
86}
87
83xorriso_cmd() 88xorriso_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
139run_xorriso() 153run_xorriso()
@@ -266,6 +280,6 @@ if [ "$REPLACE_INITRD" ]; then
266fi 280fi
267 281
268SILENT= 282SILENT=
269SHOW_CMD=y 283SHOW_XORRISO_CMD=y
270 284
271run_xorriso "$@" 285run_xorriso "$@"