Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # ce script verifie si l'image cible a deja des miniatures
- # input
- picDir=$1
- picName=$2
- # fichiers temporaires
- fileTmpLs="/tmp/thbExist918ls"
- fileTmpRef="/tmp/thbExist918ref"
- fileTmpDiff="/tmp/thbExist918diff"
- # reference "ls"
- echo "SYNOPHOTO:THUMB_B.jpg" > $fileTmpRef
- echo "SYNOPHOTO:THUMB_L.jpg" >> $fileTmpRef
- echo "SYNOPHOTO:THUMB_M.jpg" >> $fileTmpRef
- echo "SYNOPHOTO:THUMB_S.jpg" >> $fileTmpRef
- echo "SYNOPHOTO:THUMB_XL.jpg">> $fileTmpRef
- # "ls" cible
- if [[ -d "$picDir/@eaDir/$picName" ]]
- then
- # echo "existe!"
- # verifie si les fichiers thumb existe bien tous
- ls "$picDir""/@eaDir/""$picName" > $fileTmpLs
- diff $fileTmpLs $fileTmpRef > $fileTmpDiff
- # else
- # echo "n'existe pas"
- else
- # met n'importe quoi pour dans le diff pour dire que รงa differe
- echo "n'existe pas donc a creer" > $fileTmpDiff
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement