diff options
author | Perberos <[email protected]> | 2011-11-09 22:53:33 -0300 |
---|---|---|
committer | Perberos <[email protected]> | 2011-11-09 22:53:33 -0300 |
commit | 70438138096a47b2505ac55634cd94947ce378b6 (patch) | |
tree | e45e49dda10a71616466500a4ab65d1c54b5f6c1 /src/sh/isoinfo.sh | |
download | engrampa-70438138096a47b2505ac55634cd94947ce378b6.tar.bz2 engrampa-70438138096a47b2505ac55634cd94947ce378b6.tar.xz |
initial
Diffstat (limited to 'src/sh/isoinfo.sh')
-rw-r--r-- | src/sh/isoinfo.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/sh/isoinfo.sh b/src/sh/isoinfo.sh new file mode 100644 index 0000000..8bcdf35 --- /dev/null +++ b/src/sh/isoinfo.sh @@ -0,0 +1,27 @@ +filename=$2 + +JOLIET=true +ROCK_RIDGE=true + +ISOINFO=`isoinfo -d -i "$filename"` +if echo $ISOINFO | grep "NO Joliet present" >/dev/null 2>&1; then + JOLIET=false +fi +if echo $ISOINFO | grep "NO Rock Ridge present" >/dev/null 2>&1; then + ROCK_RIDGE=false +fi + +iso_extensions="" +if test $ROCK_RIDGE = true; then + iso_extensions="-R" +elif test $JOLIET = true; then + iso_extensions="-J" +fi + +if test "x$3" = x-x; then + file_to_extract=$4 + outfile=$5 + isoinfo $iso_extensions -i "$filename" -x "$file_to_extract" > "$outfile" +else + isoinfo $iso_extensions -i "$filename" -l +fi |