minor updates

This commit is contained in:
4am 2021-10-27 00:46:25 -04:00
parent 5b7acac394
commit a36a570735
2 changed files with 4 additions and 10 deletions

View File

@ -32,7 +32,7 @@ dsk: asm index
cp res/_FileInformation.txt build/
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" build/LAUNCHER.SYSTEM >>build/log
cp res/PREFS.CONF build/PREFS.CONF
bin/padto.sh 512 build/PREFS.CONF >>build/log
bin/padto.sh build/PREFS.CONF
#
# create _FileInformation.txt files for subdirectories
#
@ -105,7 +105,7 @@ dsk: asm index
done
bin/changebootloader.sh build/"$(DISK)" build/proboothd
index: md
index: md asmfx asmprelaunch
# note: even though individual lines check individual files, you really want
# to re-run this with a clean build/ directory if anything changes, because
# everything is interconnected within TOTAL.DATA

View File

@ -1,11 +1,5 @@
#!/bin/bash
totalsize=$1
outfile=$2
# zero-pads $1 to a multiple of 512 bytes, in place
[[ "$OSTYPE" == "linux-gnu" ]] \
&& filesize=$(stat -c "%s" "$outfile") \
|| filesize=$(stat -f "%z" "$outfile")
padsize=$((512-$filesize))
dd if=/dev/zero bs=1 count=$padsize 2>/dev/null >> "$outfile"
dd if=/dev/null of="$1" bs=1 count=1 seek="$((($(wc -c < "$1") + 511) & -512))" 2>/dev/null