diff options
author | Andrew Cady <d@jerkface.net> | 2016-04-29 14:36:26 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2016-04-29 14:36:30 -0400 |
commit | 153d299a41b9be4e15dab1ca29bb93a74bd2445d (patch) | |
tree | 96fbfbe7c64f0b3f02f3d755e2b129917785bb98 /xorriso.sh | |
parent | 5f41fb879ca830e5ad3345878e59072f3d6573bc (diff) |
fix paths (in progress)
Diffstat (limited to 'xorriso.sh')
-rwxr-xr-x | xorriso.sh | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/xorriso.sh b/xorriso.sh deleted file mode 100755 index 5068d4b..0000000 --- a/xorriso.sh +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | outdev=samizdat.iso | ||
4 | indev=debian-live-8.4.0-amd64-standard.iso | ||
5 | volid=SamizdatLive | ||
6 | gpg_iso_path=gnupghome | ||
7 | gnupghome=gnupghome | ||
8 | secrets=secrets | ||
9 | |||
10 | if [ $# = 0 ]; then | ||
11 | set -- debian-live-8.4.0-amd64-standard.btrfs layer.btrfs | ||
12 | fi | ||
13 | |||
14 | for fs; do | ||
15 | [ -f "$fs" ] || exit 1 | ||
16 | shift | ||
17 | set -- "$@" "rootfs/${fs##*/}=$fs" | ||
18 | done | ||
19 | |||
20 | die() { printf '%s\n' "$*"; exit 1; } | ||
21 | |||
22 | make_gnupghome() | ||
23 | { | ||
24 | [ -d "$gnupghome" ] && return | ||
25 | local reset=$- | ||
26 | set -e | ||
27 | [ ! -d "$gnupghome".tmp ] || die "Error: refusing to overwrite $gnupghome.tmp" | ||
28 | [ ! -d "$secrets".tmp ] || die "Error: refusing to overwrite $secrets.tmp" | ||
29 | mkdir -p "$gnupghome".tmp "$secrets".tmp | ||
30 | local PATH="$HOME"/src/samizdat/src:"$PATH" NO_USE_RAMFS=y | ||
31 | NEW_GNUPGHOME="$gnupghome".tmp SECRETS_DIRECTORY="$secrets".tmp ~/src/samizdat/src/samizdat-make-key --adam | ||
32 | mv "$secrets".tmp "$secrets" | ||
33 | mv "$gnupghome".tmp "$gnupghome" | ||
34 | set -$reset | ||
35 | } | ||
36 | |||
37 | make_gnupghome | ||
38 | |||
39 | if [ grub-efi.sh -nt grub-efi ]; then | ||
40 | ./grub-efi.sh || die "Error: grub-efi.sh failed" | ||
41 | fi | ||
42 | |||
43 | set -ex | ||
44 | |||
45 | xorriso \ | ||
46 | -drive_class clear_list all \ | ||
47 | -outdev "$outdev"~ \ | ||
48 | -report_about mishap \ | ||
49 | -return_with sorry 0 \ | ||
50 | -volid "$volid" \ | ||
51 | -pathspecs on \ | ||
52 | \ | ||
53 | \ | ||
54 | -add "${gpg_iso_path}=${gnupghome}" -- \ | ||
55 | -add linux=isolinux/linux -- \ | ||
56 | -follow link -add "$@" -- -follow default \ | ||
57 | \ | ||
58 | \ | ||
59 | -as mkisofs -graft-points \ | ||
60 | -b grub/i386-pc/eltorito.img \ | ||
61 | -no-emul-boot -boot-info-table \ | ||
62 | --embedded-boot grub-efi/embedded.img \ | ||
63 | --protective-msdos-label \ | ||
64 | grub=grub-efi/grub | ||
65 | |||
66 | mv -f "$outdev"~ "$outdev" | ||