LeLA/hhh-lel.sh

24 lignes
462 B
Bash
Brut Lien permanent Vue normale Historique

2017-09-05 14:48:58 +02:00
#!/bin/bash
zip = $1
out = $2
# on v<>rifie que l'archive existe
if [ ! -f $zip ]
then
echo archive inexistante
exit 3
fi
# on v<>rifie que le dossier n'existe pas d<>j<EFBFBD>
if [ -f $out ]
then
echo le dossier existe deja
exit 4
fi
# c'est parti pour le d<>zippage
unzip -j $zip -d $out
# maintenant, c'est au tour des miniatures <20> <20>tre cr<63><72>es
cd $out
for i in *.jpg *.JPG *.png *.PNG; do
convert $i -thumbnail 150x -quality 85 -scene 01 mini/$i
done
fi