diff options
Diffstat (limited to 'xorriso.sh')
-rwxr-xr-x | xorriso.sh | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -6,6 +6,28 @@ volid=SamizdatLive | |||
6 | squashfs_iso_path=live/filesystem.squashfs | 6 | squashfs_iso_path=live/filesystem.squashfs |
7 | btrfs_iso_path=live/filesystem.btrfs | 7 | btrfs_iso_path=live/filesystem.btrfs |
8 | btrfs_filesystem=debian-live-8.4.0-amd64-standard.btrfs | 8 | btrfs_filesystem=debian-live-8.4.0-amd64-standard.btrfs |
9 | gpg_iso_path=samizdat/gpg/gnupghome | ||
10 | gnupghome=gnupghome | ||
11 | secrets=secrets | ||
12 | |||
13 | die() { printf '%s\n' "$*"; exit 1; } | ||
14 | |||
15 | make_gnupghome() | ||
16 | { | ||
17 | [ -d "$gnupghome" ] && return | ||
18 | local reset=$- | ||
19 | set -e | ||
20 | [ ! -d "$gnupghome".tmp ] || die "Error: refusing to overwrite $gnupghome.tmp" | ||
21 | [ ! -d "$secrets".tmp ] || die "Error: refusing to overwrite $secrets.tmp" | ||
22 | mkdir -p "$gnupghome".tmp "$secrets".tmp | ||
23 | local PATH="$HOME"/src/samizdat/src:"$PATH" NO_USE_RAMFS=y | ||
24 | NEW_GNUPGHOME="$gnupghome".tmp SECRETS_DIRECTORY="$secrets".tmp ~/src/samizdat/src/samizdat-make-key --adam | ||
25 | mv "$secrets".tmp "$secrets" | ||
26 | mv "$gnupghome".tmp "$gnupghome" | ||
27 | set -$reset | ||
28 | } | ||
29 | |||
30 | make_gnupghome | ||
9 | 31 | ||
10 | set -ex | 32 | set -ex |
11 | 33 | ||
@@ -18,5 +40,6 @@ xorriso \ | |||
18 | -pathspecs on -overwrite on \ | 40 | -pathspecs on -overwrite on \ |
19 | -rm "$squashfs_iso_path" -- \ | 41 | -rm "$squashfs_iso_path" -- \ |
20 | -add_plainly any \ | 42 | -add_plainly any \ |
21 | "${btrfs_iso_path}=${btrfs_filesystem}" | 43 | "${btrfs_iso_path}=${btrfs_filesystem}" \ |
44 | "${gpg_iso_path}=${gnupghome}" | ||
22 | mv -f "$outdev"~ "$outdev" | 45 | mv -f "$outdev"~ "$outdev" |