From 7118703c68e92d64b84d97bf09519767767a10bd Mon Sep 17 00:00:00 2001 From: April Ayres-Griffiths Date: Thu, 15 Feb 2018 19:35:58 +1100 Subject: [PATCH] Add -with-path flag for -file-put and -file-get --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index 61da2ef..508f0d4 100644 --- a/main.go +++ b/main.go @@ -94,6 +94,7 @@ var adornedCP = flag.Bool("adorned", true, "Extract files named similar to CP") var shell = flag.Bool("shell", false, "Start interactive mode") var shellBatch = flag.String("shell-batch", "", "Execute shell command(s) from file and exit") var withDisk = flag.String("with-disk", "", "Perform disk operation (-file-extract,-file-put,-file-delete)") +var withPath = flag.String("with-path", "", "Target path for disk operation (-file-extract,-file-put,-file-delete)") var fileExtract = flag.String("file-extract", "", "File to delete from disk (-with-disk)") var filePut = flag.String("file-put", "", "File to put on disk (-with-disk)") var fileDelete = flag.String("file-delete", "", "File to delete (-with-disk)") @@ -130,6 +131,11 @@ func main() { } commandVolumes[0] = dsk commandTarget = 0 + + if *withPath != "" { + shellProcess("prefix " + *withPath) + } + switch { case *fileExtract != "": shellProcess("extract " + *fileExtract)