]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/cached-converter.sh
fix typos
[xonotic/xonotic.git] / misc / tools / cached-converter.sh
index e9a214b758880f0efb381cbd67c6997744d2de7c..012e516d06fa73d6431b7d061bba780dd0c90423 100755 (executable)
@@ -7,7 +7,7 @@ set -e
 : ${jpeg_qual_rgb:=95}
 : ${jpeg_qual_a:=99}
 : ${do_dds:=true}
-: ${dds_tool:=compressonator}
+: ${dds_tool:=compressonator-dxtc}
 : ${do_ogg:=false}
 : ${ogg_qual:=1}
 
@@ -46,6 +46,8 @@ cached()
        [ -z "$outfile2" ] || name2="$CACHEDIR/$method-$options/$sum-2.${outfile2##*.}"
        tempfile1="${name1%/*}/new-${name1##*/}"
        [ -z "$outfile2" ] || tempfile2="${name2%/*}/new-${name2##*/}"
+       [ -z "${outfile1##*/*}" && mkdir -p "${outfile1%/*}"
+       [ -z "$outfile2" ] || [ -z "${outfile2##*/*}" && mkdir -p "${outfile2%/*}"
        if [ -f "$name1" ]; then
                ln "$name1" "$outfile1" 2>/dev/null || cp "$name1" "$outfile1"
                [ -z "$outfile2" ] || ln "$name2" "$outfile2" 2>/dev/null || cp "$name2" "$outfile2"