mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-20 17:58:06 +11:00
ca84b5dac8
This was mostly lifted from my "tihello" example, but it required significant adjustments. This commit also introduces a font management system. A lot of fonts are available online, but sources aren't always clear so to avoid copyright landmines, I re-created my first 5x7 font from scratch. As it is now, this resulting ROM gets "Collapse OS>" to be displayed on the LCD screen. Much work still left to do. ref #41
23 lines
666 B
Bash
Executable File
23 lines
666 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# readlink -f doesn't work with macOS's implementation
|
|
# so, if we can't get readlink -f to work, try python with a realpath implementation
|
|
ABS_PATH=$(readlink -f "$0" || python -c "import os; print(os.path.realpath('$0'))")
|
|
|
|
# wrapper around ./emul/zasm/zasm that prepares includes CFS prior to call
|
|
DIR=$(dirname "${ABS_PATH}")
|
|
ZASMBIN="${DIR}/emul/zasm/zasm"
|
|
CFSPACK="${DIR}/cfspack/cfspack"
|
|
INCCFS=$(mktemp)
|
|
|
|
for p in "$@"; do
|
|
"${CFSPACK}" "${p}" "*.h" >> "${INCCFS}"
|
|
"${CFSPACK}" "${p}" "*.asm" >> "${INCCFS}"
|
|
"${CFSPACK}" "${p}" "*.bin" >> "${INCCFS}"
|
|
done
|
|
|
|
"${ZASMBIN}" "${INCCFS}"
|
|
RES=$?
|
|
rm "${INCCFS}"
|
|
exit $RES
|