|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -# chroot2iso.sh (Custom Debian live environment scripts) 0.0.1 |
| 3 | +# chroot2iso.sh (Custom Debian live environment scripts) 0.1.0 |
4 | 4 | # |
5 | 5 | # Copyright (C) 2018 masakoodaa |
6 | 6 | # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. |
@@ -43,7 +43,7 @@ More information availabe at https://github.com/masakoodaa/custom-debian-live-en |
43 | 43 | } |
44 | 44 |
|
45 | 45 | show_version() { |
46 | | - echo "chroot2iso.sh (Custom Debian live environment scripts) 0.0.1 |
| 46 | + echo "chroot2iso.sh (Custom Debian live environment scripts) 0.1.0 |
47 | 47 | Copyright (C) 2018 masakoodaa |
48 | 48 | License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. |
49 | 49 | This is free software: you are free to change and redistribute it. |
@@ -97,7 +97,7 @@ while :; do |
97 | 97 | --install-dependencies) |
98 | 98 | installdeps=true |
99 | 99 | ;; |
100 | | - -m|--outputfile) |
| 100 | + -o|--outputfile) |
101 | 101 | if [ "$2" ] |
102 | 102 | then |
103 | 103 | outputfile="$2" |
@@ -135,7 +135,7 @@ while :; do |
135 | 135 | break |
136 | 136 | ;; |
137 | 137 | -?*) |
138 | | - abort 'Unknown option. See \"--help\" for help or \"--usage\" for usage.' |
| 138 | + abort 'Unknown option. See "--help" for help or "--usage" for usage.' |
139 | 139 | ;; |
140 | 140 | *) |
141 | 141 | break |
|
147 | 147 | # make sure we are root & good to go |
148 | 148 | if [ "$EUID" -ne 0 ] |
149 | 149 | then |
150 | | - echo "Missing root privileges. Aborting." |
151 | | - exit 1 |
| 150 | + abort 'Missing root privileges. Aborting.' |
152 | 151 | fi |
153 | 152 |
|
154 | 153 | dependencies="chroot debootstrap syslinux isolinux squashfs-tools genisoimage memtest86+ rsync" |
@@ -208,7 +207,7 @@ set -e |
208 | 207 | set -u |
209 | 208 |
|
210 | 209 | echo "Compressing the chroot environment into a Squash filesystem..." |
211 | | -#mksquashfs "$workdir"/chroot "$workdir"/image/live/filesystem.squashfs -e boot |
| 210 | +mksquashfs "$workdir"/chroot "$workdir"/image/live/filesystem.squashfs -e boot |
212 | 211 |
|
213 | 212 | echo "Preparing the bootloader..." #TODO: check that there's only one of each |
214 | 213 | cp "$workdir"/chroot/boot/vmlinuz-* "$workdir"/image/live/vmlinuz1 |
@@ -239,16 +238,8 @@ label memtest86+ |
239 | 238 | menu label ^Memory Failure Detection (memtest86+) |
240 | 239 | kernel /live/memtest" > "$workdir"/image/isolinux/isolinux.cfg |
241 | 240 |
|
242 | | -echo "Copying files..." #TODO: refactor into loop? |
243 | | -cp /usr/lib/ISOLINUX/isolinux.bin "$workdir"/image/isolinux/ |
244 | | -cp /usr/lib/syslinux/modules/bios/menu.c32 "$workdir"/image/isolinux/ |
245 | | -cp /usr/lib/syslinux/modules/bios/hdt.c32 "$workdir"/image/isolinux/ |
246 | | -cp /usr/lib/syslinux/modules/bios/ldlinux.c32 "$workdir"/image/isolinux/ |
247 | | -cp /usr/lib/syslinux/modules/bios/libutil.c32 "$workdir"/image/isolinux/ |
248 | | -cp /usr/lib/syslinux/modules/bios/libmenu.c32 "$workdir"/image/isolinux/ |
249 | | -cp /usr/lib/syslinux/modules/bios/libcom32.c32 "$workdir"/image/isolinux/ |
250 | | -cp /usr/lib/syslinux/modules/bios/libgpl.c32 "$workdir"/image/isolinux/ |
251 | | -cp /usr/share/misc/pci.ids "$workdir"/image/isolinux/ |
| 241 | +echo "Copying files..." |
| 242 | +cp /usr/lib/ISOLINUX/isolinux.bin /usr/lib/syslinux/modules/bios/{menu,hdt,ldlinux,lib{util,menu,com32,gpl}}.c32 /usr/share/misc/pci.ids -t "$workdir"/image/isolinux/ |
252 | 243 | cp /boot/memtest86+.bin "$workdir"/image/live/memtest |
253 | 244 |
|
254 | 245 | echo "Generating USI image..." |
|
0 commit comments