diff options
author | Andrew Cady <d@jerkface.net> | 2018-02-07 17:51:56 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2018-02-07 17:51:56 -0500 |
commit | c6488f409810e5ae96b21120f7328851d05238ca (patch) | |
tree | 3bfbc79056723d051212a2bb27e6be26d0479bd8 /src | |
parent | 5680150c5204e6f4665232e55e1cc029c53faefe (diff) |
rename some variables
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--] | src/xorriso-usb.sh | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/xorriso-usb.sh b/src/xorriso-usb.sh index 04193e0..5546be0 100644..100755 --- a/src/xorriso-usb.sh +++ b/src/xorriso-usb.sh | |||
@@ -66,10 +66,10 @@ generate_keys() | |||
66 | { | 66 | { |
67 | if [ "$ADAM" -o "$BOOTLOADER_ONLY" ]; then | 67 | if [ "$ADAM" -o "$BOOTLOADER_ONLY" ]; then |
68 | kiki init || die 'kiki init failed' | 68 | kiki init || die 'kiki init failed' |
69 | gnupghome=/root/.gnupg | 69 | GPG_INPUT_DIR=/root/.gnupg |
70 | else | 70 | else |
71 | keygen.sh "$child_dir" || die "keygen.sh failed" | 71 | keygen.sh "$child_dir" || die "keygen.sh failed" |
72 | gnupghome=$child_dir/root/.gnupg | 72 | GPG_INPUT_DIR=$child_dir/root/.gnupg |
73 | trap 'umount "$child_dir"; rmdir "$child_dir"' EXIT | 73 | trap 'umount "$child_dir"; rmdir "$child_dir"' EXIT |
74 | fi | 74 | fi |
75 | } | 75 | } |
@@ -107,9 +107,9 @@ xorriso_cmd() | |||
107 | ## that specify sources of input: | 107 | ## that specify sources of input: |
108 | 108 | ||
109 | # INPUT_DEVICE | 109 | # INPUT_DEVICE |
110 | # gnupghome | 110 | # GPG_INPUT_DIR |
111 | # $@ (btrfs filesystems) | 111 | # $@ (btrfs filesystems) |
112 | # INPUT_DEVICE_COPIES | 112 | # EXTRA_INPUT_DIRS |
113 | 113 | ||
114 | ## boolean flags | 114 | ## boolean flags |
115 | 115 | ||
@@ -127,7 +127,7 @@ xorriso_cmd() | |||
127 | -pathspecs on \ | 127 | -pathspecs on \ |
128 | \ | 128 | \ |
129 | \ | 129 | \ |
130 | ${INPUT_DEVICE_COPIES} \ | 130 | ${EXTRA_INPUT_DIRS} \ |
131 | \ | 131 | \ |
132 | \ | 132 | \ |
133 | -rm_r linux -- -add linux="${vmlinuz_dir}" -- \ | 133 | -rm_r linux -- -add linux="${vmlinuz_dir}" -- \ |
@@ -136,7 +136,7 @@ xorriso_cmd() | |||
136 | \ | 136 | \ |
137 | \ | 137 | \ |
138 | -rm_r "${gpg_iso_path}" -- \ | 138 | -rm_r "${gpg_iso_path}" -- \ |
139 | -add "${gpg_iso_path}=${gnupghome}" -- \ | 139 | -add "${gpg_iso_path}=${GPG_INPUT_DIR}" -- \ |
140 | \ | 140 | \ |
141 | \ | 141 | \ |
142 | -chown_r 0 / -- \ | 142 | -chown_r 0 / -- \ |
@@ -173,6 +173,10 @@ find_child() | |||
173 | 173 | ||
174 | . samizdat-paths.sh || die 'samizdat-path.sh not found' | 174 | . samizdat-paths.sh || die 'samizdat-path.sh not found' |
175 | 175 | ||
176 | if [ -f xorriso-usb.config ]; then | ||
177 | . xorriso-usb.config | ||
178 | fi | ||
179 | |||
176 | volid=SamizdatLive | 180 | volid=SamizdatLive |
177 | vmlinuz_dir=$samizdat_linux_dir | 181 | vmlinuz_dir=$samizdat_linux_dir |
178 | efi_dir=$samizdat_grub_efi_dir | 182 | efi_dir=$samizdat_grub_efi_dir |
@@ -180,7 +184,7 @@ gpg_iso_path=gnupghome | |||
180 | 184 | ||
181 | 185 | ||
182 | outdev= | 186 | outdev= |
183 | gnupghome= | 187 | GPG_INPUT_DIR= |
184 | child_dir=$samizdat_child_dir/child.$$ | 188 | child_dir=$samizdat_child_dir/child.$$ |
185 | 189 | ||
186 | eval set -- "$(getopt -o '' --long bootloader,reuse-child:,adam,usb,detach,in:,out:,test -n "$0" -- "$@")" || | 190 | eval set -- "$(getopt -o '' --long bootloader,reuse-child:,adam,usb,detach,in:,out:,test -n "$0" -- "$@")" || |
@@ -238,8 +242,8 @@ grub-efi.sh || die "grub-efi.sh failed" | |||
238 | choose_outdev | 242 | choose_outdev |
239 | 243 | ||
240 | if [ "$REUSE_CHILD" ]; then | 244 | if [ "$REUSE_CHILD" ]; then |
241 | gnupghome=$child_dir/root/.gnupg | 245 | GPG_INPUT_DIR=$child_dir/root/.gnupg |
242 | [ -d "$gnupghome" ] || die "invalid child" | 246 | [ -d "$GPG_INPUT_DIR" ] || die "invalid child" |
243 | else | 247 | else |
244 | generate_keys | 248 | generate_keys |
245 | fi | 249 | fi |
@@ -247,12 +251,12 @@ fi | |||
247 | if [ "$INPUT_DEVICE" ]; then | 251 | if [ "$INPUT_DEVICE" ]; then |
248 | if [ "$INPUT_DEVICE" = /dev/md55 ]; then | 252 | if [ "$INPUT_DEVICE" = /dev/md55 ]; then |
249 | if mountpoint -q /cdrom; then | 253 | if mountpoint -q /cdrom; then |
250 | INPUT_DEVICE_COPIES='-add /=/cdrom --' | 254 | EXTRA_INPUT_DIRS='-add /=/cdrom --' |
251 | fi | 255 | fi |
252 | elif [ -d "$INPUT_DEVICE" ]; then | 256 | elif [ -d "$INPUT_DEVICE" ]; then |
253 | INPUT_DEVICE_COPIES="-add /=$INPUT_DEVICE --" # TODO: escape | 257 | EXTRA_INPUT_DIRS="-add /=$INPUT_DEVICE --" # TODO: escape |
254 | elif try_mount "$INPUT_DEVICE"; then | 258 | elif try_mount "$INPUT_DEVICE"; then |
255 | INPUT_DEVICE_COPIES='-add /=/mnt --' | 259 | EXTRA_INPUT_DIRS='-add /=/mnt --' |
256 | else | 260 | else |
257 | REPLACE_INITRD= | 261 | REPLACE_INITRD= |
258 | REMOVE_BTRFS= | 262 | REMOVE_BTRFS= |