https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102013

Revision: 102013
Author:   platonides
Date:     2011-11-04 17:32:30 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
Remove /dev/null redirection of error
Given that Solaris sh isn't compatible with POSIX option set -C,
added a detection for traditional bourne, which makes it switch to bash.

Modified Paths:
--------------
    trunk/tools/justMessages/update-msgs.sh

Modified: trunk/tools/justMessages/update-msgs.sh
===================================================================
--- trunk/tools/justMessages/update-msgs.sh     2011-11-04 17:18:09 UTC (rev 
102012)
+++ trunk/tools/justMessages/update-msgs.sh     2011-11-04 17:32:30 UTC (rev 
102013)
@@ -2,12 +2,19 @@
 FOLDER="../ToolserverI18N/language/messages"
 JUSTMESSAGES="justMessages"
 
+if false ^ true; then
+  # This is a traditional Bourne shell
+  # As it may not support POSIX set -C, we re-exec to bash
+  # This is needed for Solaris sh
+  exec bash "$0" "$@"
+fi
+
 if [ ! -z "$1" ]; then
    FOLDER="$1"
 fi
 
 if which "$JUSTMESSAGES" 2> /dev/null 1>&2; then
- : # Solaris sh doesn't lile if ! <command> (!: not found)
+ : # Solaris sh doesn't like if ! <command> (!: not found), it expects a ! 
binary
 else
   DIRNAME=`dirname $0`
   if [ -z "$DIRNAME" ]; then
@@ -18,7 +25,7 @@
 
 set -e
 LOCKFILE="$FOLDER/.svn/lock"
-( set -C; printf "" > "$LOCKFILE" ) 2> /dev/null
+( set -C; printf "" > "$LOCKFILE" )
 trap 'rm "$LOCKFILE"' EXIT
 TEMP=`mktemp -d`
 rsync -a "$FOLDER"/ "$TEMP"


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to