Remove thumbnail and resized pics when the original is deleted
This commit is contained in:
parent
e4dc7060ac
commit
a37c16ff4e
12
2minNoods.sh
12
2minNoods.sh
|
@ -20,8 +20,8 @@ pageheader='''<!DOCTYPE html>
|
||||||
<!-- <link rel="stylesheet" href="style.css">-->
|
<!-- <link rel="stylesheet" href="style.css">-->
|
||||||
<style>
|
<style>
|
||||||
body{
|
body{
|
||||||
max-width:650px;
|
max-width:800px;
|
||||||
margin:40px auto;
|
margin:10px auto;
|
||||||
padding:0 10px;
|
padding:0 10px;
|
||||||
font:18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
font:18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
color:#444
|
color:#444
|
||||||
|
@ -96,4 +96,12 @@ for ((page=1;page<=pageno;page++)); do
|
||||||
echo '</div></body></html>' >> "$siteroot/index.$page.html"
|
echo '</div></body></html>' >> "$siteroot/index.$page.html"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Searching for deleted images"
|
||||||
|
for i in $siteroot/img/*.jpg; do
|
||||||
|
pic="$(basename $i)"
|
||||||
|
if ! grep -Fxq "$pic" "$siteroot/photolist.txt"; then
|
||||||
|
rm -v "$siteroot/img/thumbs/$pic" "$siteroot/img/$pic"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
rm -v "$siteroot/photolist.txt"
|
rm -v "$siteroot/photolist.txt"
|
||||||
|
|
Loading…
Reference in New Issue