handle paths with embedded spaces

This commit is contained in:
dockes 2006-04-04 16:03:28 +00:00
parent 699fb34bb0
commit 14194e30d8
4 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# @(#$Id: rcldjvu,v 1.1 2006-02-03 10:53:34 dockes Exp $ (C) 2005 J.F.Dockes # @(#$Id: rcldjvu,v 1.2 2006-04-04 16:03:28 dockes Exp $ (C) 2005 J.F.Dockes
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -78,7 +78,7 @@ fi
# in C/awk \-escaped notation. Awk can only process this in string # in C/awk \-escaped notation. Awk can only process this in string
# constants, so we have a first awk pass to create an awk program to parse # constants, so we have a first awk pass to create an awk program to parse
# the string as a constant (...). This is not exactly robust or nice # the string as a constant (...). This is not exactly robust or nice
title=`djvused $infile -e 'select 1;output-ant' | \ title=`djvused "$infile" -e 'select 1;output-ant' | \
grep ' (title ' | sed -e 's/^.* (title //' -e 's/)$//' |\ grep ' (title ' | sed -e 's/^.* (title //' -e 's/)$//' |\
awk ' awk '
{ {
@ -96,7 +96,7 @@ cat <<EOF
<pre> <pre>
EOF EOF
djvutxt $infile | sed -e 's/[ ][ ]*$//' | \ djvutxt "$infile" | sed -e 's/[ ][ ]*$//' | \
awk ' awk '
BEGIN { BEGIN {
cont = "" cont = ""

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# @(#$Id: rclmedia,v 1.1 2006-03-28 09:38:12 dockes Exp $ (C) 2004 J.F.Dockes # @(#$Id: rclmedia,v 1.2 2006-04-04 16:03:28 dockes Exp $ (C) 2004 J.F.Dockes
#================================================================ #================================================================
# rclmedia # rclmedia
# Handle media files for recoll. This currently returns an empty # Handle media files for recoll. This currently returns an empty
@ -61,7 +61,7 @@ echo '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">'
echo '</head><body>' echo '</head><body>'
echo '<pre>' echo '<pre>'
if test X$cmdsok = X1 ; then if test X$cmdsok = X1 ; then
id3info $infile | \ id3info "$infile" | \
sed -e 's/</&lt;/g' -e 's/&/&amp;/g' -e 's/===.*://' | \ sed -e 's/</&lt;/g' -e 's/&/&amp;/g' -e 's/===.*://' | \
grep -v 'Tag information for' grep -v 'Tag information for'
fi fi

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# @(#$Id: rclps,v 1.6 2006-02-03 10:53:35 dockes Exp $ (C) 2004 J.F.Dockes # @(#$Id: rclps,v 1.7 2006-04-04 16:03:28 dockes Exp $ (C) 2004 J.F.Dockes
# Parts taken from Estraier: # Parts taken from Estraier:
#================================================================ #================================================================
# Estraier: a personal full-text search system # Estraier: a personal full-text search system
@ -34,7 +34,7 @@ then
fi fi
infile="$1" infile="$1"
if test X$infile = X- ; then if test "X$infile" = X- ; then
cmd=$decoder cmd=$decoder
else else
cmd="$decoder $1" cmd="$decoder $1"
@ -67,7 +67,7 @@ checkcmds()
checkcmds $decoder iconv awk checkcmds $decoder iconv awk
# check the input file existence # check the input file existence
if test X$infile != X- -a ! -f "$infile" if test "X$infile" != X- -a ! -f "$infile"
then then
printf '%s: %s: no such file\n' "$progname" "$infile" printf '%s: %s: no such file\n' "$progname" "$infile"
exit 1 exit 1

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# @(#$Id: rclsoff,v 1.5 2006-01-27 13:37:31 dockes Exp $ (C) 2004 J.F.Dockes # @(#$Id: rclsoff,v 1.6 2006-04-04 16:03:28 dockes Exp $ (C) 2004 J.F.Dockes
# Parts taken from Estraier: # Parts taken from Estraier:
#================================================================ #================================================================
# Estraier: a personal full-text search system # Estraier: a personal full-text search system
@ -84,7 +84,7 @@ cleanup()
trap cleanup EXIT SIGHUP SIGQUIT SIGINT SIGTERM trap cleanup EXIT SIGHUP SIGQUIT SIGINT SIGTERM
# Unzip the input file and change to the unzipped directory # Unzip the input file and change to the unzipped directory
unzip -q -d $tmpdir/rclsofftmp $infile unzip -q -d $tmpdir/rclsofftmp "$infile"
cd $tmpdir/rclsofftmp cd $tmpdir/rclsofftmp
# Note: there can be newlines inside the description field, we don't want # Note: there can be newlines inside the description field, we don't want