Verified Commit 60bd9098 authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

adelie-build-cd: Final pass of bashism removal

parent 8d3d28f8
......@@ -32,32 +32,32 @@ fatal() {
ensure_commands() {
if ! type apk>/dev/null 2>/dev/null; then
if ! command -pv apk>/dev/null 2>/dev/null; then
fatal
printf 'You must have apk installed. On Gentoo, see sys-devel/apk-tools.\n'
exit -1
exit 127
fi
if ! type cpio>/dev/null 2>/dev/null; then
if ! command -pv cpio>/dev/null 2>/dev/null; then
fatal
printf 'You must have cpio installed. On Gentoo, see app-arch/cpio.\n'
exit -1
exit 127
fi
if ! type mksquashfs>/dev/null 2>/dev/null; then
if ! command -pv mksquashfs>/dev/null 2>/dev/null; then
fatal
printf 'You must have mksquashfs installed. On Gentoo, see sys-fs/squashfs-tools.\n'
exit -1
exit 127
fi
if ! type xorriso>/dev/null 2>/dev/null; then
if ! command -pv xorriso>/dev/null 2>/dev/null; then
fatal
printf 'You must have xorriso installed:\n\n'
printf '* cdrkit (Alpine, Gentoo) will not generate a usable PPC ISO.\n'
printf '* wodim (Debian) will not generate a usable PPC64 ISO.\n'
printf '* cdrtools (Schily) will overrun the PPC64 ISO and write junk to grubcore.img.\n'
printf '\nSorry, but xorriso really is required.\n'
exit -1
exit 127
fi
}
......@@ -101,7 +101,7 @@ while [ -n "$1" ]; do
;;
*)
usage >&2
exit -1
exit 127
;;
esac
shift
......@@ -131,7 +131,7 @@ clean_dirs() {
printf 'This will erase all files at the directories %s/cdroot-%s\n' `pwd` $ARCH
printf '%s/initrd-%s and %s/squashroot-%s.\n\n' `pwd` $ARCH `pwd` $ARCH
printf 'When you are ready, press RETURN. To cancel, press Ctrl-C.\n'
read
read dontcare
rm -rf cdroot-$ARCH
rm -rf initrd-$ARCH
......@@ -300,9 +300,7 @@ make_initrd() {
header 'Compressing initrd...'
pushd initrd-$ARCH
find . | cpio -H newc -o > ../cdroot-$ARCH/initrd
popd
(cd initrd-$ARCH; find . | cpio -H newc -o) > cdroot-$ARCH/initrd
gzip -9 cdroot-$ARCH/initrd
mv cdroot-$ARCH/initrd.gz cdroot-$ARCH/initrd
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment