From a9567f0b35bef977259188ebb32152ef6a3af31c Mon Sep 17 00:00:00 2001 From: Mike Pope Date: Fri, 28 Dec 2018 13:05:06 +1030 Subject: [PATCH] Allow fsgunpack to handle fsm files. --- bin/fsgunpack.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/fsgunpack.sh b/bin/fsgunpack.sh index 3f62457ee..c8c837600 100755 --- a/bin/fsgunpack.sh +++ b/bin/fsgunpack.sh @@ -7,15 +7,16 @@ for f in ${1+"$@"} ; do case "x$f" in - x*.fsg) ;; + x*.fsg) EXT=fsg ;; + x*.fsm) EXT=fsm ;; *) echo "not an fsg file: $f" >&2 ; exit 1 ;; esac - n=`basename "$f" .fsg` + n=`basename "$f" ."$EXT"` mkdir "$n" || exit $? cp "$f" "$n" (cd "$n" ;\ - unzip "$n.fsg" 1> /dev/null ;\ - rm -f "$n.fsg" ;\ + unzip "$n.$EXT" 1> /dev/null ;\ + rm -f "$n.$EXT" ;\ for s in *.xml ; do xml_pp -i "$s" 2> /dev/null ; done) || exit $? done exit 0