From eef19f110b15fd5ba62aa57b5289e79e217494d3 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Tue, 24 May 2016 11:30:08 +1000 Subject: [PATCH] BUG: Fix use of wrong path separator char in dosflash command --- Makefile | 6 +++++- autoexec.bat.template | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 736e0ac..e4c3fe2 100644 --- a/Makefile +++ b/Makefile @@ -142,8 +142,12 @@ $(DEPSDIR)/slice.insert.deps: Makefile cp --reflink=auto $< $@ ./hexpatch.pl $@ $@.d/*.patch +# using both __DIR and __FL2 is a hack to get around needing to quote the +# DOS path separator. It feels like there should be a beter way if I put +# my mind to it.. +# %.iso.bat: %.iso.orig %.iso.orig.desc autoexec.bat.template - sed -e "s%__FL2%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |cut -d/ -f3-`%; s%__DESC%`cat $<.desc`%" autoexec.bat.template >$@ + sed -e "s%__DIR%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |cut -d/ -f3`%; s%__FL2%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |cut -d/ -f4`%; s%__DESC%`cat $<.desc`%" autoexec.bat.template >$@ # helper to write the ISO onto a cdrw %.iso.blank_burn: %.iso diff --git a/autoexec.bat.template b/autoexec.bat.template index 2462ddb..77446a2 100644 --- a/autoexec.bat.template +++ b/autoexec.bat.template @@ -17,5 +17,6 @@ echo. echo This disk is prepared for __DESC echo. pause -dosflash /sd /ipf ec /file __FL2 +cd __DIR +..\dosflash /sd /ipf ec /file __FL2