summaryrefslogtreecommitdiff
path: root/xorriso.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-20 14:49:15 -0400
committerAndrew Cady <d@jerkface.net>2016-04-20 14:53:04 -0400
commitc423735419e683fb2b084cc4c3a1b9948aa98ad2 (patch)
treee983b995bf5cbe01072969665714dd56cd016d1f /xorriso.sh
parent66b5c3933b0f28d57020b66524bb8b115dee225d (diff)
Put gnupghome onto the iso
This currently requires samizdat sources in $HOME/src/samizdat. They are called from there instead of being copied into this repository.
Diffstat (limited to 'xorriso.sh')
-rwxr-xr-xxorriso.sh25
1 files changed, 24 insertions, 1 deletions
diff --git a/xorriso.sh b/xorriso.sh
index 29e1ff6..784f2ef 100755
--- a/xorriso.sh
+++ b/xorriso.sh
@@ -6,6 +6,28 @@ volid=SamizdatLive
6squashfs_iso_path=live/filesystem.squashfs 6squashfs_iso_path=live/filesystem.squashfs
7btrfs_iso_path=live/filesystem.btrfs 7btrfs_iso_path=live/filesystem.btrfs
8btrfs_filesystem=debian-live-8.4.0-amd64-standard.btrfs 8btrfs_filesystem=debian-live-8.4.0-amd64-standard.btrfs
9gpg_iso_path=samizdat/gpg/gnupghome
10gnupghome=gnupghome
11secrets=secrets
12
13die() { printf '%s\n' "$*"; exit 1; }
14
15make_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
30make_gnupghome
9 31
10set -ex 32set -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}"
22mv -f "$outdev"~ "$outdev" 45mv -f "$outdev"~ "$outdev"