1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| #!/bin/bash
ba="/mnt/Test/"
destt="/Test/Image/Photo/"
o="/Original"
ext1="jpg"
ext2="png"
ext3="bmb"
#NOM DES PHOTOS
c01=ALBUM35
rm -r $destt$c01
cp -r $ba$c01 $destt$c01
#!/bin/bash
imagelundi="/Test/Drapeau/J/LUN.png"
imagemardi="/Test/Drapeau/J/MAR.png"
imagemercredi="/Test/Drapeau/J/MER.png"
imagejeudi="/Test/Drapeau/J/JEU.png"
imagevendredi="/Test/Drapeau/J/VEN.png"
imagesamedi="/Test/Drapeau/J/SAM.png"
imagedimanche="/Test/Drapeau/J/DIM.png"
imgD1="image1$(date +%A)"
imgD2="image2$(date +%A)"
imgD3="image3$(date +%A)"
imgD4="image4$(date +%A)"
imgD5="image5$(date +%A)"
imgD6="image6$(date +%A)"
imgD7="image7$(date +%A)"
for image1 in $destt$c01$o/*.$ext1
do filename1="${image1##*/}"
if [ "$(date -d"${filename1:10:8}" +%A)" = "lundi" ]
then composite -compose Over "$imagelundi" "$image1" "$image1"
fi
done
for image2 in $destt$c01$o/*.$ext1
do filename2="${image2##*/}"
if [ "$(date -d"${filename2:10:8}" +%A)" = "mardi" ]
then composite -compose Over "$imagemardi" "$image2" "$image2"
fi
done
for image3 in $destt$c01$o/*.$ext1
do filename3="${image3##*/}"
if [ "$(date -d"${filename3:10:8}" +%A)" = "mercredi" ]
then composite -compose Over "$imagemercredi" "$image3" "$image3"
fi
done
for image4 in $destt$c01$o/*.$ext1
do filename4="${image4##*/}"
if [ "$(date -d"${filename4:10:8}" +%A)" = "jeudi" ]
then composite -compose Over "$imagejeudi" "$image4" "$image4"
fi
done
for image5 in $destt$c01$o/*.$ext1
do filename5="${image5##*/}"
if [ "$(date -d"${filename5:10:8}" +%A)" = "vendredi" ]
then composite -compose Over "$imagevendredi" "$image5" "$image5"
fi
done
for image6 in $destt$c01$o/*.$ext1
do filename6="${image6##*/}"
if [ "$(date -d"${filename6:10:8}" +%A)" = "samedi" ]
then composite -compose Over "$imagesamedi" "$image6" "$image6"
fi
done
for image7 in $destt$c01$o/*.$ext1
do filename7="${image7##*/}"
if [ "$(date -d"${filename7:10:8}" +%A)" = "dimanche" ]
then composite -compose Over "$imagedimanche" "$image7" "$image7"
fi
done |