#!/bin/sh -ex

mkdir -p proc;
for i in "$@"; do
	cp -av "$i" proc/;
	exiftool -P -ifd0:Orientation= -ifd1:Orientation= -Sony:CameraOrientation="Horizontal (normal)" -trailer:all= -mpf:all= -PreviewImage= -ThumbnailImage= -PreviewImageSize=0x0 -overwrite_original "proc/$i";
	touch -r "$i" "proc/$i";
done;
