Move script file content for run-in-runcpm.sh into command line params

This commit is contained in:
Philip Zembrod 2023-07-02 11:23:26 +02:00
parent 20a2715203
commit 46f0c31dc4
2 changed files with 18 additions and 14 deletions

View File

@ -33,26 +33,26 @@ inctest.log: $(patsubst %, $(cpmfilesdir)/%, volks4th.com) \
$(patsubst src/%, $(cpmfilesdir)/%, \
src/include.fb src/inctest.fth) \
| emu
echo "volks4th" > $(runcpmdir)/input.script
echo "include include.fb" >> $(runcpmdir)/input.script
echo "include inctest.fth" >> $(runcpmdir)/input.script
echo "bye" >> $(runcpmdir)/input.script
echo "exit" >> $(runcpmdir)/input.script
./emulator/run-in-runcpm.sh volks4th
./emulator/run-in-runcpm.sh \
"volks4th" \
"include include.fb" \
"include inctest.fth" \
"bye" \
"exit"
cp $(runcpmdir)/output.log $@
logtest.log: $(patsubst %, $(cpmfilesdir)/%, volks4th.com) \
$(patsubst tests/%, $(cpmfilesdir)/%, \
tests/log2file.fb) \
| emu
echo "volks4th" > $(runcpmdir)/input.script
echo "include log2file.fb" >> $(runcpmdir)/input.script
echo "logopen" >> $(runcpmdir)/input.script
echo ".( hello world) cr" >> $(runcpmdir)/input.script
echo "logclose" >> $(runcpmdir)/input.script
echo "bye" >> $(runcpmdir)/input.script
echo "exit" >> $(runcpmdir)/input.script
./emulator/run-in-runcpm.sh volks4th
./emulator/run-in-runcpm.sh \
"volks4th" \
"include log2file.fb" \
"logopen" \
".( hello world) cr" \
"logclose" \
"bye" \
"exit"
cp $(runcpmdir)/output.log output.log
../../tools/trunc-ctrl-z.py $(runcpmdir)/A/0/LOGFILE.TXT \
$(runcpmdir)/logfile.txt

View File

@ -12,6 +12,10 @@ toolsdir="${basedir}/../../tools"
logfile="${runcpmdir}/output.log"
scriptfile="${runcpmdir}/input.script"
rm -f "${logfile}"
rm -f "${scriptfile}"
for line in "$@"; do
echo "${line}" >> "${scriptfile}"
done
test -d "${runcpm_a0}" || mkdir -p "${runcpm_a0}"