X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fmktempd;h=7a09a4b3bb16d172c31590f6e1d4da86ae3a8888;hb=9dc832be349ac6317de3af56db94c8163fc26707;hp=5bee3f0c76d4125130e0051d61998f9caa817970;hpb=49161ce7902821ef24a9e30b16dc87147c24da65;p=gnulib.git diff --git a/build-aux/mktempd b/build-aux/mktempd index 5bee3f0c7..7a09a4b3b 100755 --- a/build-aux/mktempd +++ b/build-aux/mktempd @@ -1,7 +1,7 @@ #!/bin/sh # Create a temporary directory, much like mktemp -d does. -# Copyright (C) 2007-2008 Free Software Foundation, Inc. +# Copyright (C) 2007-2011 Free Software Foundation, Inc. # 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 @@ -114,7 +114,9 @@ mktempd() base_template=`echo "$template"|sed 's/XX*$//'` # Calculate how many X's we've just removed. - nx=`expr length "$template" - length "$base_template"` + template_length=`echo "$template" | wc -c` + nx=`echo "$base_template" | wc -c` + nx=`expr $template_length - $nx` err= i=1