Fixed octal issue

This commit is contained in:
Morgan Hardwood
2015-08-23 22:47:01 +02:00
parent 7f60ed65c2
commit b22b8582b0
2 changed files with 9 additions and 11 deletions

View File

@@ -46,8 +46,6 @@ for cam in "${cams[@]}"; do
xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType2']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -sony:all) > "${tmpdir}/cam" || { printf '%s\n' "Saving failed: ${tmpdir}/cam"; exit 1; }
sort -fuV "${tmpdir}/cam" > "${tmpdir}/sony-lenstype2"
rm -f "${tmpdir}/cam"
# Pad IDs shorter than 5 digits with 0s
sed -r -i -e 's/^[0-9]/0000&/' -e 's/0*([0-9]{5,})/\1/' "${tmpdir}/sony-lenstype2"
sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' ${tmpdir}/sony ${tmpdir}/sony-lenstype2
;;
esac