blob: 10e8ec65480b67c5c5cde83b207be75dfeada440 [file] [log] [blame] [edit]
--- gettext-tools/misc/autopoint.in 2011-09-06 23:40:21 -0400
+++ gettext-tools/misc/autopoint.in 2011-09-09 11:45:07 -0400
@@ -100,7 +100,7 @@ func_find_curr_installdir ()
*) curr_executable=`pwd`/"$curr_executable" ;;
esac
# Resolve symlinks.
- sed_dirname='s,/[^/]*$,,'
+ sed_dirname='s,[\\/][^\\/]*$,,'
sed_linkdest='s,^.* -> \(.*\),\1,p'
while : ; do
lsline=`LC_ALL=C ls -l "$curr_executable"`
@@ -114,7 +114,7 @@ func_find_curr_installdir ()
*) break ;;
esac
done
- curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'`
+ curr_installdir=`echo "$curr_executable" | sed -e 's,[\\/][^\\/]*$,,'`
# Canonicalize.
curr_installdir=`cd "$curr_installdir" && pwd`
}
@@ -125,16 +125,16 @@ func_find_prefixes ()
orig_installprefix="$orig_installdir"
curr_installprefix="$curr_installdir"
while true; do
- orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
- curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
+ orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*[\\/]\([^\\/]*\)$,\1,p'`
+ curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*[\\/]\([^\\/]*\)$,\1,p'`
if test -z "$orig_last" || test -z "$curr_last"; then
break
fi
if test "$orig_last" != "$curr_last"; then
break
fi
- orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'`
- curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'`
+ orig_installprefix=`echo "$orig_installprefix" | sed -e 's,[\\/][^\\/]*$,,'`
+ curr_installprefix=`echo "$curr_installprefix" | sed -e 's,[\\/][^\\/]*$,,'`
done
}
if test "@RELOCATABLE@" = yes; then
@@ -144,7 +144,7 @@ if test "@RELOCATABLE@" = yes; then
func_find_curr_installdir # determine curr_installdir
func_find_prefixes
# Relocate the directory variables that we use.
- gettext_datadir=`echo "$gettext_datadir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'`
+ gettext_datadir=`echo "$gettext_datadir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,[\\/]$,,'`
fi
# func_trace macro configure.ac
@@ -543,7 +543,7 @@ func_destfile ()
# po/* ->
sharedowner=
allpodirs=
- case `echo "$1" | sed -e 's,[^/]*$,,'` in
+ case `echo "$1" | sed -e 's,[^\\/]*$,,'` in
"" )
case "$1" in
config.rpath ) destfile="$auxdir$1" ;;
@@ -551,7 +551,7 @@ func_destfile ()
* ) destfile="$1" ;;
esac
;;
- m4/ ) destfile=`echo "$1" | sed -e "s,^m4/,$m4dir/,"` ;;
+ m4/ ) destfile=`echo "$1" | sed -e "s,^m4\([\\/]\),$m4dir\1,"` ;;
intl/ ) if test -n "$omitintl"; then destfile=""; else destfile="$1"; fi ;;
po/ ) destfile=`echo "$1" | sed -e "s,^po/,,"` allpodirs=yes ;;
* ) destfile="$1" ;;
@@ -600,7 +600,7 @@ if test -z "$force"; then
mismatch=
func_tmpdir
mismatchfile="$tmp"/autopoint.diff
- for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
+ for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir[\\/]archive[\\/],," | LC_ALL=C sort`; do
func_destfile "$file"
if test -n "$destfile"; then
func_compare_to_destfile ()
@@ -613,7 +613,7 @@ if test -z "$force"; then
else
echo "autopoint: File $finaldestfile has been locally modified." 1>&2
mismatch=yes
- diff -c "$work_dir/archive/$file" "$finaldestfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile"
+ diff -c "$work_dir/archive/$file" "$finaldestfile" | sed -e "1s,$work_dir[\\/]archive[\\/],," >> "$mismatchfile"
fi
fi
fi
@@ -639,11 +639,11 @@ fi
# 'to' is a relative pathname, relative to the current directory.
func_mkdir_for ()
{
- base=`echo "$1" | sed -e 's,/[^/]*$,,'`
+ base=`echo "$1" | sed -e 's,[\\/][^\\/]*$,,'`
if test "X$base" != "X$1" && test -n "$base"; then
func_mkdir_for "$base"
# Recompute base. It was clobbered by the recursive call.
- base=`echo "$1" | sed -e 's,/[^/]*$,,'`
+ base=`echo "$1" | sed -e 's,[\\/][^\\/]*$,,'`
test -d "$base" || { echo "Creating directory $base"; mkdir "$base"; }
fi
}
@@ -678,7 +678,7 @@ func_backup ()
}
# Now copy the files.
-for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
+for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir[\\/]archive[\\/],," | LC_ALL=C sort`; do
func_destfile "$file"
if test -n "$destfile"; then
func_copy_to_destfile ()
--- gettext-tools/misc/gettextize.in 2010-06-06 08:49:57 -0400
+++ gettext-tools/misc/gettextize.in 2011-09-09 11:37:21 -0400
@@ -100,7 +100,7 @@ func_find_curr_installdir ()
*) curr_executable=`pwd`/"$curr_executable" ;;
esac
# Resolve symlinks.
- sed_dirname='s,/[^/]*$,,'
+ sed_dirname='s,[\\/][^\\/]*$,,'
sed_linkdest='s,^.* -> \(.*\),\1,p'
while : ; do
lsline=`LC_ALL=C ls -l "$curr_executable"`
@@ -114,7 +114,7 @@ func_find_curr_installdir ()
*) break ;;
esac
done
- curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'`
+ curr_installdir=`echo "$curr_executable" | sed -e 's,[\\/][^\\/]*$,,'`
# Canonicalize.
curr_installdir=`cd "$curr_installdir" && pwd`
}
@@ -125,16 +125,16 @@ func_find_prefixes ()
orig_installprefix="$orig_installdir"
curr_installprefix="$curr_installdir"
while true; do
- orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
- curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
+ orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*[\\/]\([^\\/]*\)$,\1,p'`
+ curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*]\\/]\([^\\/]*\)$,\1,p'`
if test -z "$orig_last" || test -z "$curr_last"; then
break
fi
if test "$orig_last" != "$curr_last"; then
break
fi
- orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'`
- curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'`
+ orig_installprefix=`echo "$orig_installprefix" | sed -e 's,[\\/][^\\/]*$,,'`
+ curr_installprefix=`echo "$curr_installprefix" | sed -e 's,[\\/][^\\/]*$,,'`
done
}
if test "@RELOCATABLE@" = yes; then
@@ -144,7 +144,7 @@ if test "@RELOCATABLE@" = yes; then
func_find_curr_installdir # determine curr_installdir
func_find_prefixes
# Relocate the directory variables that we use.
- gettext_datadir=`echo "$gettext_datadir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'`
+ gettext_datadir=`echo "$gettext_datadir/" | sed -e "s%^${orig_installprefix}\([\\/]\)%${curr_installprefix}\1%" | sed -e 's,[\\/]$,,'`
fi
# func_trace macro configure.ac