r102013 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102012‎ | r102013 | r102014 >
Date:17:32, 4 November 2011
Author:platonides
Status:ok
Tags:
Comment:
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) (history)

Diff [purge]

Index: trunk/tools/justMessages/update-msgs.sh
@@ -2,12 +2,19 @@
33 FOLDER="../ToolserverI18N/language/messages"
44 JUSTMESSAGES="justMessages"
55
 6+if false ^ true; then
 7+ # This is a traditional Bourne shell
 8+ # As it may not support POSIX set -C, we re-exec to bash
 9+ # This is needed for Solaris sh
 10+ exec bash "$0" "$@"
 11+fi
 12+
613 if [ ! -z "$1" ]; then
714 FOLDER="$1"
815 fi
916
1017 if which "$JUSTMESSAGES" 2> /dev/null 1>&2; then
11 - : # Solaris sh doesn't lile if ! <command> (!: not found)
 18+ : # Solaris sh doesn't like if ! <command> (!: not found), it expects a ! binary
1219 else
1320 DIRNAME=`dirname $0`
1421 if [ -z "$DIRNAME" ]; then
@@ -18,7 +25,7 @@
1926
2027 set -e
2128 LOCKFILE="$FOLDER/.svn/lock"
22 -( set -C; printf "" > "$LOCKFILE" ) 2> /dev/null
 29+( set -C; printf "" > "$LOCKFILE" )
2330 trap 'rm "$LOCKFILE"' EXIT
2431 TEMP=`mktemp -d`
2532 rsync -a "$FOLDER"/ "$TEMP"

Status & tagging log