senddoc.sh (7aca818a) | senddoc.sh (ba2c76b2) |
---|---|
1#!/bin/sh 2# ************************************************************* 3# 4# Licensed to the Apache Software Foundation (ASF) under one 5# or more contributor license agreements. See the NOTICE file 6# distributed with this work for additional information 7# regarding copyright ownership. The ASF licenses this file 8# to you under the Apache License, Version 2.0 (the --- 5 unchanged lines hidden (view full) --- 14# Unless required by applicable law or agreed to in writing, 15# software distributed under the License is distributed on an 16# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17# KIND, either express or implied. See the License for the 18# specific language governing permissions and limitations 19# under the License. 20# 21# ************************************************************* | 1#!/bin/sh 2# ************************************************************* 3# 4# Licensed to the Apache Software Foundation (ASF) under one 5# or more contributor license agreements. See the NOTICE file 6# distributed with this work for additional information 7# regarding copyright ownership. The ASF licenses this file 8# to you under the Apache License, Version 2.0 (the --- 5 unchanged lines hidden (view full) --- 14# Unless required by applicable law or agreed to in writing, 15# software distributed under the License is distributed on an 16# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17# KIND, either express or implied. See the License for the 18# specific language governing permissions and limitations 19# under the License. 20# 21# ************************************************************* |
22URI_ENCODE="`dirname $0`/uri-encode" | 22URI_ENCODE="`dirname "$0"`/uri-encode" |
23FOPTS="" 24 25# linux file utility needs -L option to resolve symlinks 26if [ "`uname -s`" = "Linux" ] 27then 28 FOPTS="-L" 29fi 30 --- 64 unchanged lines hidden (view full) --- 95 SUBJECT=$2 96 shift 97 ;; 98 --body) 99 BODY=$2 100 shift 101 ;; 102 --attach) | 23FOPTS="" 24 25# linux file utility needs -L option to resolve symlinks 26if [ "`uname -s`" = "Linux" ] 27then 28 FOPTS="-L" 29fi 30 --- 64 unchanged lines hidden (view full) --- 95 SUBJECT=$2 96 shift 97 ;; 98 --body) 99 BODY=$2 100 shift 101 ;; 102 --attach) |
103 ATTACH=${ATTACH:-}${ATTACH:+,}`echo "file://$2" | ${URI_ENCODE}` | 103 ATTACH=${ATTACH:-}${ATTACH:+,}`echo "file://$2" | "${URI_ENCODE}"` |
104 shift 105 ;; 106 *) 107 ;; 108 esac 109 shift; 110 done 111 --- 43 unchanged lines hidden (view full) --- 155 BODY="$2" 156 shift 157 ;; 158 --from) 159 FROM="$2" 160 shift 161 ;; 162 --attach) | 104 shift 105 ;; 106 *) 107 ;; 108 esac 109 shift; 110 done 111 --- 43 unchanged lines hidden (view full) --- 155 BODY="$2" 156 shift 157 ;; 158 --from) 159 FROM="$2" 160 shift 161 ;; 162 --attach) |
163 ATTACH="${ATTACH:-}${ATTACH:+ }--attach "`echo "file://$2" | ${URI_ENCODE}` | 163 ATTACH="${ATTACH:-}${ATTACH:+ }--attach "`echo "file://$2" | "${URI_ENCODE}"` |
164 shift 165 ;; 166 *) 167 ;; 168 esac 169 shift; 170 done 171 --- 66 unchanged lines hidden (view full) --- 238 if [ "${TO}" != "" ]; then 239 MAILTO="${MAILTO:-}${MAILTO:+&}to=$2" 240 else 241 TO="$2" 242 fi 243 shift 244 ;; 245 --cc) | 164 shift 165 ;; 166 *) 167 ;; 168 esac 169 shift; 170 done 171 --- 66 unchanged lines hidden (view full) --- 238 if [ "${TO}" != "" ]; then 239 MAILTO="${MAILTO:-}${MAILTO:+&}to=$2" 240 else 241 TO="$2" 242 fi 243 shift 244 ;; 245 --cc) |
246 MAILTO="${MAILTO:-}${MAILTO:+&}cc="`echo "$2" | ${URI_ENCODE}` | 246 MAILTO="${MAILTO:-}${MAILTO:+&}cc="`echo "$2" | "${URI_ENCODE}"` |
247 shift 248 ;; 249 --bcc) | 247 shift 248 ;; 249 --bcc) |
250 MAILTO="${MAILTO:-}${MAILTO:+&}bcc="`echo "$2" | ${URI_ENCODE}` | 250 MAILTO="${MAILTO:-}${MAILTO:+&}bcc="`echo "$2" | "${URI_ENCODE}"` |
251 shift 252 ;; 253 --subject) | 251 shift 252 ;; 253 --subject) |
254 MAILTO="${MAILTO:-}${MAILTO:+&}subject"=`echo "$2" | ${URI_ENCODE}` | 254 MAILTO="${MAILTO:-}${MAILTO:+&}subject"=`echo "$2" | "${URI_ENCODE}"` |
255 shift 256 ;; 257 --body) | 255 shift 256 ;; 257 --body) |
258 MAILTO="${MAILTO:-}${MAILTO:+&}body="`echo "$2" | ${URI_ENCODE}` | 258 MAILTO="${MAILTO:-}${MAILTO:+&}body="`echo "$2" | "${URI_ENCODE}"` |
259 shift 260 ;; 261 --attach) | 259 shift 260 ;; 261 --attach) |
262 MAILTO="${MAILTO:-}${MAILTO:+&}attach="`echo "file://$2" | ${URI_ENCODE}` | 262 MAILTO="${MAILTO:-}${MAILTO:+&}attach="`echo "file://$2" | "${URI_ENCODE}"` |
263 shift 264 ;; 265 *) 266 ;; 267 esac 268 shift; 269 done 270 --- 9 unchanged lines hidden (view full) --- 280 if [ "${TO}" != "" ]; then 281 MAILTO="${MAILTO:-}${MAILTO:+&}to=$2" 282 else 283 TO="$2" 284 fi 285 shift 286 ;; 287 --cc) | 263 shift 264 ;; 265 *) 266 ;; 267 esac 268 shift; 269 done 270 --- 9 unchanged lines hidden (view full) --- 280 if [ "${TO}" != "" ]; then 281 MAILTO="${MAILTO:-}${MAILTO:+&}to=$2" 282 else 283 TO="$2" 284 fi 285 shift 286 ;; 287 --cc) |
288 MAILTO="${MAILTO:-}${MAILTO:+&}cc="`echo "$2" | ${URI_ENCODE}` | 288 MAILTO="${MAILTO:-}${MAILTO:+&}cc="`echo "$2" | "${URI_ENCODE}"` |
289 shift 290 ;; 291 --bcc) | 289 shift 290 ;; 291 --bcc) |
292 MAILTO="${MAILTO:-}${MAILTO:+&}bcc="`echo "$2" | ${URI_ENCODE}` | 292 MAILTO="${MAILTO:-}${MAILTO:+&}bcc="`echo "$2" | "${URI_ENCODE}"` |
293 shift 294 ;; 295 --subject) | 293 shift 294 ;; 295 --subject) |
296 MAILTO="${MAILTO:-}${MAILTO:+&}subject"=`echo "$2" | ${URI_ENCODE}` | 296 MAILTO="${MAILTO:-}${MAILTO:+&}subject"=`echo "$2" | "${URI_ENCODE}"` |
297 shift 298 ;; 299 --body) | 297 shift 298 ;; 299 --body) |
300 MAILTO="${MAILTO:-}${MAILTO:+&}body="`echo "$2" | ${URI_ENCODE}` | 300 MAILTO="${MAILTO:-}${MAILTO:+&}body="`echo "$2" | "${URI_ENCODE}"` |
301 shift 302 ;; 303 --attach) | 301 shift 302 ;; 303 --attach) |
304 MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | ${URI_ENCODE}` | 304 MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | "${URI_ENCODE}"` |
305 shift 306 ;; 307 *) 308 ;; 309 esac 310 shift; 311 done 312 --- 44 unchanged lines hidden (view full) --- 357 ;; 358 359 Mail | Thunderbird | *.app ) 360 361 while [ "$1" != "" ]; do 362 case $1 in 363 --attach) 364 #i95688# fix filenames containing accented chars, whatever alien | 305 shift 306 ;; 307 *) 308 ;; 309 esac 310 shift; 311 done 312 --- 44 unchanged lines hidden (view full) --- 357 ;; 358 359 Mail | Thunderbird | *.app ) 360 361 while [ "$1" != "" ]; do 362 case $1 in 363 --attach) 364 #i95688# fix filenames containing accented chars, whatever alien |
365 ATTACH="${ATTACH:-}${ATTACH:+ }"`echo "file://$2" | ${URI_ENCODE}` | 365 ATTACH="${ATTACH:-}${ATTACH:+ }"`echo "file://$2" | "${URI_ENCODE}"` |
366 shift 367 ;; 368 *) 369 ;; 370 esac 371 shift; 372 done 373 /usr/bin/open -a "${MAILER}" ${ATTACH} --- 9 unchanged lines hidden (view full) --- 383 if [ "${TO}" != "" ]; then 384 MAILTO="${MAILTO:-}${MAILTO:+&}to=$2" 385 else 386 TO="$2" 387 fi 388 shift 389 ;; 390 --cc) | 366 shift 367 ;; 368 *) 369 ;; 370 esac 371 shift; 372 done 373 /usr/bin/open -a "${MAILER}" ${ATTACH} --- 9 unchanged lines hidden (view full) --- 383 if [ "${TO}" != "" ]; then 384 MAILTO="${MAILTO:-}${MAILTO:+&}to=$2" 385 else 386 TO="$2" 387 fi 388 shift 389 ;; 390 --cc) |
391 MAILTO="${MAILTO:-}${MAILTO:+&}cc="`echo "$2" | ${URI_ENCODE}` | 391 MAILTO="${MAILTO:-}${MAILTO:+&}cc="`echo "$2" | "${URI_ENCODE}"` |
392 shift 393 ;; 394 --bcc) | 392 shift 393 ;; 394 --bcc) |
395 MAILTO="${MAILTO:-}${MAILTO:+&}bcc="`echo "$2" | ${URI_ENCODE}` | 395 MAILTO="${MAILTO:-}${MAILTO:+&}bcc="`echo "$2" | "${URI_ENCODE}"` |
396 shift 397 ;; 398 --subject) | 396 shift 397 ;; 398 --subject) |
399 MAILTO="${MAILTO:-}${MAILTO:+&}subject="`echo "$2" | ${URI_ENCODE}` | 399 MAILTO="${MAILTO:-}${MAILTO:+&}subject="`echo "$2" | "${URI_ENCODE}"` |
400 shift 401 ;; 402 --body) | 400 shift 401 ;; 402 --body) |
403 MAILTO="${MAILTO:-}${MAILTO:+&}body="`echo "$2" | ${URI_ENCODE}` | 403 MAILTO="${MAILTO:-}${MAILTO:+&}body="`echo "$2" | "${URI_ENCODE}"` |
404 shift 405 ;; 406 --attach) | 404 shift 405 ;; 406 --attach) |
407 MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "$2" | ${URI_ENCODE}` | 407 MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "$2" | "${URI_ENCODE}"` |
408 shift 409 ;; 410 *) 411 ;; 412 esac 413 shift; 414 done 415 --- 15 unchanged lines hidden --- | 408 shift 409 ;; 410 *) 411 ;; 412 esac 413 shift; 414 done 415 --- 15 unchanged lines hidden --- |