File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
3- source common.sh
3+ source " $( dirname $0 ) / common.sh"
44
55SOURCE=${1?" path to source.asm is missing: \$ 1" }
6+ SOURCE_DIR=" $( dirname $SOURCE ) "
67BINARY=${2?" path for output binary is missing: \$ 2" }
78MAX_SIZE=446
89
910echo " [Build] Starting..."
10- nasm -f bin " ${SOURCE:? } " -o " ${BINARY:? } "
11+ nasm -f bin " ${SOURCE:? } " -o " ${BINARY:? } " -i " ${SOURCE_DIR} "
1112binary_size=" $( stat -c ' %s' ${BINARY:? } ) "
1213(( ${binary_size:? } <= ${MAX_SIZE:? } )) || raise " Binary size exceeds ${MAX_SIZE:? } bytes, got ${binary_size:? } "
13- echo " [Build] Done ."
14+ echo " [Build] done. BinarySize: ${binary_size} bytes. MaxSize: ${MAX_SIZE} bytes ."
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
3- source common.sh
3+ source " $( dirname $0 ) / common.sh"
44
55BINARY=${1?" path to binary is missing: \$ 1" }
66DISK=${2?" path for disk to burn is missing: \$ 2" }
Original file line number Diff line number Diff line change @@ -9,9 +9,8 @@ SOURCE="$(realpath main.asm)"
99BINARY=" ${BUILD_DIR:? } /main"
1010DISK=" $( realpath ../disk.vmdk) "
1111
12- mkdir -p BUILD_DIR
12+ mkdir -p ${ BUILD_DIR:? }
1313
14- cd " ${SCRIPTS_DIR} "
15- bash build.sh " ${SOURCE} " " ${BINARY} "
16- bash burn.sh " ${BINARY} " " ${DISK} "
14+ bash " ${SCRIPTS_DIR} /build.sh" " ${SOURCE} " " ${BINARY} "
15+ bash " ${SCRIPTS_DIR} /burn.sh" " ${BINARY} " " ${DISK} "
1716echo " Run Completed!"
You can’t perform that action at this time.
0 commit comments