# HG changeset patch # User Paul Boddie # Date 1558799334 -7200 # Node ID 8c2e5d04586091a4eb4a9f69e0a3af3b91a3cb62 # Parent 358363607059991f597f45605b4ee7daaad4ac1a Added the initial version of the general tool coordinating the others. diff -r 358363607059 -r 8c2e5d045860 makesd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makesd Sat May 25 17:48:54 2019 +0200 @@ -0,0 +1,61 @@ +#!/bin/sh + +# Prepare a disk for booting a hardware device. + +PROGNAME=`basename "$0"` +THISDIR=`dirname "$0"` + +COMMON="$THISDIR/makesd-common" +EXPAND="$THISDIR/makesd-expand-def" +FORMAT="$THISDIR/makesd-format" +PARTSUMMARY="$THISDIR/makesd-partition-summary" +PARTITION="$THISDIR/makesd-partition" + +. "$COMMON" + + + +# Obtain details of the selected device. + +check_device + +SUMMARY="`basename "$DEV"`.summary" + +# Test for the cylinder alignment option. + +if test_align_cylinder $* ; then shift 1 ; fi + +# Obtain the definition name. + +DEF="$1" + +if [ ! "$DEF" ] ; then + cat 1>&2 <&2 < "$SUMMARY" + +# Partition the given device. + +"$PARTITION" $ALIGN_CYLINDER < "$SUMMARY" + +# Format the given device. + +"$FORMAT" < "$SUMMARY"