gst-autogen.sh: Remove the old autoregen.sh if it exists before recreating it, to...
authorJan Schmidt <thaytan@mad.scientist.com>
Thu, 30 Jun 2005 11:56:37 +0000 (11:56 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Thu, 30 Jun 2005 11:56:37 +0000 (11:56 +0000)
Original commit message from CVS:
2005-06-30  Jan Schmidt  <thaytan@mad.scientist.com>

* gst-autogen.sh:
Remove the old autoregen.sh if it exists before recreating it,
to prevent confusing any shell process that might be reading it
currently.

ChangeLog
gst-autogen.sh

index 335421c..0e082b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-30  Jan Schmidt  <thaytan@mad.scientist.com>
+
+       * gst-autogen.sh:
+         Remove the old autoregen.sh if it exists before recreating it,
+         to prevent confusing any shell process that might be reading it
+         currently.
+
 2005-06-29  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * m4/gtk-doc.m4:
index 97b2c20..f13abf4 100644 (file)
@@ -1,4 +1,10 @@
 # a silly hack that generates autoregen.sh but it's handy
+# Remove the old autoregen.sh first to create a new file,
+# as the current one may be being read by the shell executing
+# this script.
+if [ -f "autoregen.sh" ]; then
+  rm autoregen.sh
+fi
 echo "#!/bin/sh" > autoregen.sh
 echo "./autogen.sh $@ \$@" >> autoregen.sh
 chmod +x autoregen.sh