projects
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
13517a9
)
Added quotes around filenames.
author
Francois Fleuret
<francois@fleuret.org>
Wed, 19 Jan 2011 16:28:53 +0000
(17:28 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Wed, 19 Jan 2011 16:28:53 +0000
(17:28 +0100)
archivepics.sh
patch
|
blob
|
history
diff --git
a/archivepics.sh
b/archivepics.sh
index
40ad62d
..
d6a1742
100755
(executable)
--- a/
archivepics.sh
+++ b/
archivepics.sh
@@
-49,7
+49,7
@@
for i in "$@"; do
if [[ ! -f ${i/JPG/MOV} ]] && [[ ! -f ${i/JPG/3gp} ]]; then
if [[ ! -f ${i/JPG/MOV} ]] && [[ ! -f ${i/JPG/3gp} ]]; then
- if [[ $(stat --printf=%s
$i
) -lt ${archive_size_min} ]]; then
+ if [[ $(stat --printf=%s
"$i"
) -lt ${archive_size_min} ]]; then
echo "Image $i is too small."
exit 1
fi
echo "Image $i is too small."
exit 1
fi
@@
-72,12
+72,12
@@
for i in "$@"; do
if [[ -f ${ref} ]]; then
if [[ -f ${ref} ]]; then
- TAG=$(exif --ifd=EXIF -t "Date and Time (original)"
${ref}
| grep Value)
+ TAG=$(exif --ifd=EXIF -t "Date and Time (original)"
"${ref}"
| grep Value)
if [[ ${TAG} ]]; then
TIMESTAMP=$(echo ${TAG} | sed -e \
"s/^ *Value: *\([0-9]*\):\([0-9]*\):\([0-9]*\) *\([0-9]*\):\([0-9]*\):\([0-9]*\).*$/\1\2\3\4\5.\6/")
if [[ ${TAG} ]]; then
TIMESTAMP=$(echo ${TAG} | sed -e \
"s/^ *Value: *\([0-9]*\):\([0-9]*\):\([0-9]*\) *\([0-9]*\):\([0-9]*\):\([0-9]*\).*$/\1\2\3\4\5.\6/")
- touch -t $TIMESTAMP
$i
+ touch -t $TIMESTAMP
"$i"
else
echo "No exif tag in $i, can not set the date properly."
fi
else
echo "No exif tag in $i, can not set the date properly."
fi
@@
-95,12
+95,12
@@
done
for i in "$@"; do
for i in "$@"; do
- ARCHIVING_PATH=$(ls -l --time-style=+%Y/%b --format=verbose
$i
| awk '{ print $6 }')
+ ARCHIVING_PATH=$(ls -l --time-style=+%Y/%b --format=verbose
"$i"
| awk '{ print $6 }')
mkdir -p ${IMAGE_ARCHIVE_DIR}/${ARCHIVING_PATH}
mkdir -p ${IMAGE_ARCHIVE_DIR}/${ARCHIVING_PATH}
- echo "Archiving ${IMAGE_ARCHIVE_DIR}/${ARCHIVING_PATH}/
$(basename $i)"
+ echo "Archiving ${IMAGE_ARCHIVE_DIR}/${ARCHIVING_PATH}/
"$(basename "$i")
- cp -p -i
$i
${IMAGE_ARCHIVE_DIR}/${ARCHIVING_PATH}
+ cp -p -i
"$i"
${IMAGE_ARCHIVE_DIR}/${ARCHIVING_PATH}
done
done