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

View File

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