--- psiconv/trunk/formats/html4_links.sh 2004/04/29 19:40:59 249
+++ psiconv/trunk/formats/html4_links.sh 2004/04/29 21:43:28 250
@@ -1,26 +1,24 @@
#! /bin/sh
-generate_links()
+compute_command_line()
{
-#local index_file name file lineno
-
index_file="$1"
-
- command='sed '
- {
- while read file lineno name; do
- command="$command -e "\''s,\['"$name"'\],,g'\'
- command="$command -e "\''s,«'"$name"'»,'"$name"',g'\'
- done
- } < "$index_file"
+ printf "sed "
+ while read file lineno name; do
+ printf "-e %s " \''s,\['"$name"'\],,g'\'
+ printf "-e %s " \''s,«'"$name"'»,'"$name"',g'\'
+ done < "$index_file"
+}
+generate_links()
+{
+ command=`compute_command_line "$1"`
+#echo $command
eval "$command"
}
generate_headers()
{
-# local index_file name this_file
-
index_file_generate_headers="$1"
this_file_generate_headers=`echo $2 | sed 's,.*/,,' | sed 's,\..*$,,'`