Preserving timestamp when rotating original file
This commit is contained in:
6
piwigo_thumbgen.sh
Executable file → Normal file
6
piwigo_thumbgen.sh
Executable file → Normal file
@@ -66,8 +66,10 @@ do
|
||||
if [ "$quali" -le "0" ]; then
|
||||
quali=94
|
||||
fi
|
||||
echo "rotate with quality $quali : $file"
|
||||
mogrify -auto-orient -quality ${quali} "${file}" #> /dev/null 2>&1
|
||||
echo "rotate with quality $quali preserving timestamp: $file"
|
||||
TIMESTAMP="$( ls -l --time-style='+%Y%m%d%H%M.%S' "${file}" | cut --delimiter=' ' --fields=6 )"
|
||||
mogrify -auto-orient -quality ${quali} "${file}"
|
||||
touch -t ${TIMESTAMP} "${file}"
|
||||
fi
|
||||
|
||||
#echo "MISSING! ${destDir}${fnNoExt}-me.${fnExt}"
|
||||
|
Reference in New Issue
Block a user