fix: fix aax{c} detection

This commit is contained in:
Paul Campbell 2024-11-03 09:39:26 +00:00
parent e22f229f37
commit 01807e961e

View file

@ -39,7 +39,7 @@ _require_dir *dirs:
mkdir {{ dirs }} 2>/dev/null || true mkdir {{ dirs }} 2>/dev/null || true
_move target *files: _move target *files:
mv {{ files }} {{ target }}/ 2>/dev/null || true mv {{ files }} {{ target }} 2>/dev/null || true
_download-asin *asins: _download-asin *asins:
just _require_dir TEMP just _require_dir TEMP
@ -56,7 +56,7 @@ convert: convert-aax convert-aaxc
convert-aax: convert-aax:
#!/usr/bin/env bash #!/usr/bin/env bash
just _require_dir M4B just _require_dir M4B
if [ $(fd --glob 'AAX/*.aax' | wc -l) -gt 0 ] if [ $(fd . AAX | wc -l) -gt 0 ]
then then
for F in AAX/*.aax for F in AAX/*.aax
do do
@ -69,12 +69,14 @@ convert-aax:
$O $O
rm $F rm $F
done done
else
echo No AAX to convert
fi fi
convert-aaxc: convert-aaxc:
#!/usr/bin/env bash #!/usr/bin/env bash
just _require_dir M4B just _require_dir M4B
if [ $(fd --glob 'AAXC/*.aaxc' | wc -l) -gt 0 ] if [ $(fd . AAXC | wc -l) -gt 0 ]
then then
for AAXC in AAXC/*.aaxc for AAXC in AAXC/*.aaxc
do do
@ -82,6 +84,8 @@ convert-aaxc:
M4B="M4B/$(basename ${AAXC%.aaxc}).m4b" M4B="M4B/$(basename ${AAXC%.aaxc}).m4b"
just _convert-one-aaxc $AAXC $VOUCHER $M4B just _convert-one-aaxc $AAXC $VOUCHER $M4B
done done
else
echo No AAXC to convert
fi fi
_convert-one-aaxc aaxc_file voucher_file m4b_file: _convert-one-aaxc aaxc_file voucher_file m4b_file: