mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-04 14:31:52 +00:00
minor updates
This commit is contained in:
parent
5b7acac394
commit
a36a570735
4
Makefile
4
Makefile
@ -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
|
||||
|
10
bin/padto.sh
10
bin/padto.sh
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user