bin/ripxplore.rb in ripxplore-0.7.2 vs bin/ripxplore.rb in ripxplore-0.8.0

- old
+ new

@@ -16,11 +16,12 @@ # -e | --extract FILENAME extract file by name (either to stdout, # or file specified by --output) # -h | --help display this message # -I | --init FILESYSTEM initialise the disk with the specified filesytem # DSK will be created if it doesn't exist. -# FILESYSTEM can be : AppleDos, AppleCPM, BeautifulBoot +# FILESYSTEM can be : AppleDos, AppleCPM, +# BeautifulBoot, CbmDos # -l | --list FILENAME BASIC files are listed, binary files are disassembled # -o | --output FILENAME specify name to save extracted file as # -r | --raw don't convert files to ASCII # -S | --showtrace show full stack trace on any error # -t | --filetype FILETYPE file type for file being added. @@ -43,11 +44,11 @@ # Apple Pascal (read only) # Apple CP/M (READ/WRITE) # Apple DOS 3.3 (READ/WRITE) # NADOL (read only) # ProDOS 8 (read only) -# CBM DOS 2.6 (read only) +# CBM DOS 2.6 (READ/WRITE) # TRS-DOS (read only) #pull in the RipXplore lib - we need to give the specific path to it since otherwise on case insensitive OSes (e.g. windows) this file #will get pulled in instead @@ -146,9 +147,11 @@ end puts fsimage.catalog end if (!add_filename.nil?) then + add_file_options[:filetype] = :C64Prg if add_file_options[:filetype].nil? && add_filename=~/\.prg$/ && fsimage.file_system==CbmDos + raise "filetype must be specified (via -t switch) when adding a file" if add_file_options[:filetype].nil? filecontents=File.open(add_filename,"rb").read new_file=fsimage.add_file(add_file_options[:filetype].to_sym,File.basename(add_filename).upcase,filecontents) fsimage.save_as(filename) end