annotate plugins/ufraw/geeqie-ufraw @ 1657:00673c03d856

various geeqie-ufraw improvements - handle xmp sidecars - commandline options, help
author nadvornik
date Sat, 20 Jun 2009 23:15:11 +0000
parents f66934d3706b
children a15dc91173b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
1 #!/bin/bash
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
2
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
3 # FIXME TODO:
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
4 # improve the default ufraw configuration
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
5 # localization?
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
6
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
7
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
8 # matches raw file names, used as case insensitive
1653
f66934d3706b fixed regexp usage
nadvornik
parents: 1651
diff changeset
9 RAW_REGEX='.*\.(arw|srf|sr2|crw|cr2|kdc|dcr|k25|raf|mef|mos|mrw|nef|orf|pef|ptx|dng|x3f|raw|r3d|3fr|erf)$'
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
10
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
11 # matches output file names, used as case insensitive
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
12 OUT_REGEX='.*\.(jpg|jpeg|png|tif|tiff|ppm)$'
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
13
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
14 # matches ufraw id file names, used as case sensitive
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
15 ID_REGEX='.*\.ufraw$'
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
16
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
17 # matches xmp sidecar file names, used as case insensitive
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
18 XMP_REGEX='.*\.xmp$'
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
19
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
20 # extract output file from ufraw id file
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
21 get_output_from_id ()
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
22 {
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
23 grep "<OutputFilename>.*</OutputFilename>" "$1" |sed -e 's|.*<OutputFilename>\(.*\)</OutputFilename>.*|\1|'
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
24 }
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
25
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
26 # extract input file from ufraw id file
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
27 get_input_from_id ()
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
28 {
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
29 grep "<InputFilename>.*</InputFilename>" "$1" |sed -e 's|.*<InputFilename>\(.*\)</InputFilename>.*|\1|'
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
30 }
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
31
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
32 add_xmp_from_sidecar ()
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
33 {
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
34 idfile=$1
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
35 input=`get_input_from_id "$idfile"`
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
36 [ -f "$input" ] || return 1
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
37
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
38 basename=${input%.*}
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
39 dirname=${basename%/*}
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
40 xmp=`find "$dirname" -maxdepth 1 -path "$basename.*" -regextype posix-egrep -iregex "$XMP_REGEX" -print | head -n 1`
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
41 [ -f "$xmp" ] || return 1
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
42
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
43 output=`get_output_from_id "$idfile"`
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
44
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
45 [ -f "$output" ] || return 1
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
46 xmpext=.${xmp##*.}
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
47
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
48 # passing the source file to exiv2 is unnecessary complicated
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
49 # do not change the orientation, ufraw resets it to 1
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
50 exiv2 insert -ixX -l "$dirname" -S "$xmpext" "$output"
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
51 exiv2 -M "set Xmp.tiff.Orientation 1" "$output"
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
52 }
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
53
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
54 # test if the id file has changed and the output needs to be refreshed
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
55 id_file_changed ()
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
56 {
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
57 idfile=$1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
58 output=`get_output_from_id "$idfile"`
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
59 [ ! -f "$output" -o "$idfile" -nt "$output" ]
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
60 }
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
61
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
62 # refresh the output file specified by given id file, if necessary
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
63 process_ufraw_id_file ()
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
64 {
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
65 idfile=$1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
66 if id_file_changed "$idfile" ; then
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
67 ufraw-batch --overwrite "$idfile"
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
68 add_xmp_from_sidecar "$idfile"
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
69 fi
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
70 }
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
71
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
72 # test for newly added raw files that were never processed
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
73 raw_file_not_processed ()
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
74 {
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
75 rawfile=$1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
76 basename=${rawfile%.*}
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
77 dirname=${basename%/*}
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
78 outfiles=`find "$dirname" -maxdepth 1 -path "$basename.*" -regextype posix-egrep \( -iregex "$OUT_REGEX" -o -regex "$ID_REGEX" \) -print `
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
79 [ -z "$outfiles" ] # return true if no possible output file exists
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
80
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
81 # raw+jpeg pair created by the camera is considered processed,
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
82 # - this function returns false, the jpeg from camera is preserved and id file is not created
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
83 }
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
84
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
85 # process raw file for the first time
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
86 process_raw_file_default ()
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
87 {
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
88 rawfile=$1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
89 if raw_file_not_processed "$rawfile" ; then
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
90 ufraw-batch --create-id=also \
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
91 --wb=camera \
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
92 --exposure=auto \
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
93 --out-type=jpeg \
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
94 --compression=96 \
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
95 "$rawfile"
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
96 idfile=${rawfile%.*}.ufraw
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
97 add_xmp_from_sidecar "$idfile"
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
98 fi
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
99 }
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
100
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
101 # process all files listed in file $1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
102 # if $2 is not empty, produce output for zenity --progress
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
103 process_list ()
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
104 {
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
105 list=$1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
106 use_zenity=$2
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
107
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
108 count=`wc -l <$list`
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
109 n=0
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
110 [ -n "$use_zenity" ] && echo 0
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
111
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
112 if [ "$count" -gt 0 ] ; then
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
113 while read file; do
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
114 [ -f "$file" ] || continue
1653
f66934d3706b fixed regexp usage
nadvornik
parents: 1651
diff changeset
115 if echo "$file"|grep -E -q -i "$RAW_REGEX" ; then
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
116 process_raw_file_default "$file"
1653
f66934d3706b fixed regexp usage
nadvornik
parents: 1651
diff changeset
117 elif echo "$file"|grep -E -q "$ID_REGEX" ; then
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
118 process_ufraw_id_file "$file"
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
119
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
120 fi
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
121
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
122 n=$((n + 1))
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
123
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
124 # the function can end at the 'echo' command with broken pipe
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
125 # if it is cancelled via zenity
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
126 [ -n "$use_zenity" ] && echo $((n * 100 / count))
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
127
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
128 done <$list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
129 fi
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
130 [ -n "$use_zenity" ] && echo 100
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
131 }
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
132
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
133 # process all files in directories $@, including subdirectories
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
134 # processing is controlled by zenity dialogs if $DISPLAY is set
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
135 process_tree ()
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
136 {
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
137 list=`mktemp /tmp/geeqie-ufraw-list.XXXXXXXXXX` || exit 1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
138
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
139 find "$@" -regextype posix-egrep -iregex "$RAW_REGEX" -print | while read rawfile ; do
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
140 raw_file_not_processed "$rawfile" && echo "$rawfile"
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
141 done >>$list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
142
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
143 #refresh output from changed id files
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
144 find "$@" -regextype posix-egrep -regex "$ID_REGEX" -print | while read idfile ; do
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
145 id_file_changed "$idfile" && echo "$idfile"
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
146 done >>$list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
147
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
148 if [ -n "$DISPLAY" ] ; then
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
149 if [ -s $list ] && \
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
150 zenity --list --title "Files to proceed" --text "Files to proceed" --column "Files" <$list ; then
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
151 process_list $list with_zenity | zenity --progress --auto-close
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
152 else
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
153 zenity --info --title "All files are up-to-date" --text "All files are up-to-date"
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
154 fi
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
155 else
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
156 # no DISPLAY
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
157 process_list $list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
158 fi
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
159 rm $list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
160 }
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
161
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
162 print_help ()
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
163 {
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
164 cat << EOT
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
165
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
166 RAW file collection maintenance tool
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
167
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
168 Usage:
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
169
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
170 geeqie-ufraw [raw file | id file] ...
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
171 geeqie-ufraw --recursive [dir] ...
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
172 geeqie-ufraw -h | --help
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
173
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
174 This script searches for new RAW files or for modified UFRaw
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
175 ID files and process them with ufraw-batch. It can work either
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
176 on individual files or on whole directory.
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
177 The functions are designed to be usable from Geeqie menu.
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
178
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
179 EOT
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
180 }
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
181
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
182 #parse commandline
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
183
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
184 while true ; do
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
185 case "$1" in
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
186 -v|--verbose)
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
187 verbose=yes #fixme: not used yet
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
188 shift ;;
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
189 -R|--recursive)
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
190 recursive=yes
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
191 shift ;;
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
192 -h|-help|--help|-*)
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
193 print_help
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
194 exit ;;
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
195 *)
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
196 break ;;
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
197 esac
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
198 done
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
199
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
200 if [ $# -lt 1 ] ; then
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
201 print_help
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
202 exit
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
203 fi
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
204
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
205 if [ -n "$recursive" ] ; then
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
206 # recursive processing of directories
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
207 process_tree "$@"
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
208 else
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
209 list=`mktemp /tmp/geeqie-ufraw-list.XXXXXXXXXX` || exit 1
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
210 for file in "$@" ; do
1657
00673c03d856 various geeqie-ufraw improvements
nadvornik
parents: 1653
diff changeset
211 echo "$file" |sed -e "s|^\([^/]\)|$PWD/\1|"
1651
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
212 done >>$list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
213 process_list $list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
214 rm $list
8966e72ae99a ufraw-batch script
nadvornik
parents:
diff changeset
215 fi