diff options
author | Yves Orton <demerphq@gmail.com> | 2008-12-27 14:41:41 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2008-12-27 14:41:41 +0100 |
commit | 953f6acfa20ec275ec39a552dfac8124bd93ebdf (patch) | |
tree | 29f5d82d6927615c234b593cbc652f6d3d78ca7c | |
parent | c8bf35be1fe2115c24efee943468eddbb5a0e0a0 (diff) | |
download | perl-953f6acfa20ec275ec39a552dfac8124bd93ebdf.tar.gz |
make make_patchnum.sh (more) portable
-rw-r--r-- | make_patchnum.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/make_patchnum.sh b/make_patchnum.sh index 8de5255232..2d8303813a 100644 --- a/make_patchnum.sh +++ b/make_patchnum.sh @@ -1,5 +1,7 @@ #!/bin/sh +. config.sh + Existing=`cat .patchnum 2>/dev/null` Existing_Sha1=`cat .sha1 2>/dev/null` @@ -15,9 +17,19 @@ elif [ -d ".git" ]; then fi if [ "$Existing" != "$Current" -o "$Existing_Sha1" != "$Sha1" ]; then + (echo "hi there\c" ; echo " ") >.echotmp + if $contains c .echotmp >/dev/null 2>&1 ; then + n='-n' + c='' + else + n='' + c='\c' + fi + rm -f .echotmp echo "Updating .patchnum and .sha1" - echo -n $Current > .patchnum - echo -n $Sha1 > .sha1 + echo $n "$Current$c" > .patchnum + echo $n "$Sha1$c" > .sha1 + else echo "Reusing .patchnum and .sha1" fi |