summaryrefslogtreecommitdiff
path: root/xorriso-layer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xorriso-layer.sh')
-rwxr-xr-xxorriso-layer.sh38
1 files changed, 0 insertions, 38 deletions
diff --git a/xorriso-layer.sh b/xorriso-layer.sh
deleted file mode 100755
index 7ce4776..0000000
--- a/xorriso-layer.sh
+++ /dev/null
@@ -1,38 +0,0 @@
1#!/bin/bash
2
3outdev=debian-live-8.4.0-amd64-standard.btrfs.layered.iso
4indev=debian-live-8.4.0-amd64-standard.btrfs.iso
5volid=SamizdatLive
6btrfs_layer_iso_path=live/layer%s.btrfs
7btrfs_layer_filesystem="$1"
8
9die() { printf '%s\n' "$*"; exit 1; }
10
11[ -f "$btrfs_layer_filesystem" ] || die "Usage: $0 <layer.btrfs> [layer2.btrfs ...]"
12
13i=0
14while [ $i -lt $# ]; do
15 arg=$1
16 [ $i -eq 0 ] && n='' || n=$((i + 1))
17 arg=$(printf "${btrfs_layer_iso_path}=%s" "$n" "$arg")
18 shift
19 set -- "$@" "$arg"
20 i=$((i + 1))
21done
22
23for arg; do echo "a=$arg"; done; exit;
24
25set -ex
26
27cp --reflink "$indev" "$outdev"~
28time xorriso \
29 -drive_class clear_list all \
30 -outdev "$outdev"~ -indev "$outdev"~ \
31 -report_about mishap \
32 -volid "$volid" \
33 -return_with sorry 0 \
34 -pathspecs on -overwrite on \
35 -add_plainly any \
36 "$@"
37
38mv -f "$outdev"~ "$outdev"