projects
/
scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Many changes!!!
[scripts.git]
/
archivepics.sh
diff --git
a/archivepics.sh
b/archivepics.sh
index
afaf5d4
..
202d73c
100755
(executable)
--- a/
archivepics.sh
+++ b/
archivepics.sh
@@
-39,7
+39,7
@@
fi
for i in "$@"; do
for i in "$@"; do
- if [[ ! -f ${i/JPG/MOV} ]]; then
+ if [[ ! -f ${i/JPG/MOV} ]]
&& [[ ! -f ${i/JPG/3gp} ]]
; then
if [[ $(stat --printf=%s $i) -lt ${archive_size_min} ]]; then
echo "Image $i is too small."
if [[ $(stat --printf=%s $i) -lt ${archive_size_min} ]]; then
echo "Image $i is too small."
@@
-54,7
+54,13
@@
done
for i in "$@"; do
for i in "$@"; do
- ref=${i/MOV/JPG}
+ base=${i/%.???/}
+
+ if [[ -f ${base}.JPG ]]; then ref=${base}.JPG; fi
+ if [[ -f ${base}.jpg ]]; then ref=${base}.jpg; fi
+ if [[ -f ${base}.jpeg ]]; then ref=${base}.jpeg; fi
+
+ echo "ref=${ref}"
if [[ -f ${ref} ]]; then
if [[ -f ${ref} ]]; then