You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pf...@apache.org on 2012/01/24 16:30:35 UTC
svn commit: r1235297 - in /incubator/ooo/trunk/main: ./ odk/pack/copying/
sal/qa/helper/gcov/ setup_native/scripts/
setup_native/tests/opensolaris/bundledextensions/ slideshow/qa/debug/
solenv/bin/ soltools/testhxx/ sysui/desktop/share/ testautomation/...
Author: pfg
Date: Tue Jan 24 15:30:34 2012
New Revision: 1235297
URL: http://svn.apache.org/viewvc?rev=1235297&view=rev
Log:
Avoid some uses of non portable #!/bin/bash in shell scripts.
bash is common in GNU/linux but is, in general, not
available by default on other systems or likely to
be in a different place. When possible /bin/sh
should be used but if bash extensions are required
"#!/bin/env bash" is considered more portable.
Modified:
incubator/ooo/trunk/main/fetch_tarballs.sh
incubator/ooo/trunk/main/odk/pack/copying/addsym-macosx.sh
incubator/ooo/trunk/main/sal/qa/helper/gcov/gcov_all
incubator/ooo/trunk/main/sal/qa/helper/gcov/statistics
incubator/ooo/trunk/main/setup_native/scripts/deregister_extensions
incubator/ooo/trunk/main/setup_native/scripts/install_solaris.sh
incubator/ooo/trunk/main/setup_native/scripts/mac_install.script
incubator/ooo/trunk/main/setup_native/scripts/register_extensions
incubator/ooo/trunk/main/setup_native/scripts/uninstall_solaris.sh
incubator/ooo/trunk/main/setup_native/tests/opensolaris/bundledextensions/send_ooo
incubator/ooo/trunk/main/slideshow/qa/debug/colors.sh
incubator/ooo/trunk/main/slideshow/qa/debug/nodetree.sh
incubator/ooo/trunk/main/solenv/bin/addsym-macosx.sh
incubator/ooo/trunk/main/soltools/testhxx/create.pl
incubator/ooo/trunk/main/sysui/desktop/share/makefile.mk
incubator/ooo/trunk/main/testautomation/tools/run_tests/run_tests.sh
incubator/ooo/trunk/main/toolkit/src2xml/dryrunall.sh
incubator/ooo/trunk/main/toolkit/src2xml/sc.sh
incubator/ooo/trunk/main/toolkit/src2xml/sd.sh
incubator/ooo/trunk/main/toolkit/src2xml/sw.sh
incubator/ooo/trunk/main/writerfilter/source/doctok/cleanupresources
incubator/ooo/trunk/main/writerfilter/source/ooxml/status.sh
Modified: incubator/ooo/trunk/main/fetch_tarballs.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/fetch_tarballs.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/fetch_tarballs.sh (original)
+++ incubator/ooo/trunk/main/fetch_tarballs.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
#**************************************************************
#
# Licensed to the Apache Software Foundation (ASF) under one
@@ -117,7 +117,7 @@ mkdir -p $TARFILE_LOCATION/tmp
cd $TARFILE_LOCATION/tmp
-function basename ()
+basename ()
{
echo $1 | sed "s/^\(.*\/\)//"
}
@@ -126,7 +126,7 @@ function basename ()
#
# Download a file from a URL and add its md5 checksum to its name.
#
-function download ()
+download ()
{
local URL=$1
@@ -155,7 +155,7 @@ function download ()
#
# Download a file from a URL and check its md5 sum to the one that is part of its name.
#
-function download_and_check ()
+download_and_check ()
{
local URL=$1
Modified: incubator/ooo/trunk/main/odk/pack/copying/addsym-macosx.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/odk/pack/copying/addsym-macosx.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/odk/pack/copying/addsym-macosx.sh (original)
+++ incubator/ooo/trunk/main/odk/pack/copying/addsym-macosx.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# This script is needed in the process of generating exported
# symbols list on Mac OS X
Modified: incubator/ooo/trunk/main/sal/qa/helper/gcov/gcov_all
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sal/qa/helper/gcov/gcov_all?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sal/qa/helper/gcov/gcov_all (original)
+++ incubator/ooo/trunk/main/sal/qa/helper/gcov/gcov_all Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# $Id: gcov_all,v 1.4 2005-11-02 17:23:43 kz Exp $
# This helper run lists all c and cxx files from selected directories.
Modified: incubator/ooo/trunk/main/sal/qa/helper/gcov/statistics
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sal/qa/helper/gcov/statistics?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sal/qa/helper/gcov/statistics (original)
+++ incubator/ooo/trunk/main/sal/qa/helper/gcov/statistics Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# $Id: statistics,v 1.3 2003-06-11 16:38:03 vg Exp $
./gcov_filter.pl -i ../../../util/sal.map --showallfunc FOO | sort | uniq >exportedfunctions.txt
Modified: incubator/ooo/trunk/main/setup_native/scripts/deregister_extensions
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/setup_native/scripts/deregister_extensions?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/setup_native/scripts/deregister_extensions (original)
+++ incubator/ooo/trunk/main/setup_native/scripts/deregister_extensions Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
USAGE="Usage: $0"
Modified: incubator/ooo/trunk/main/setup_native/scripts/install_solaris.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/setup_native/scripts/install_solaris.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/setup_native/scripts/install_solaris.sh (original)
+++ incubator/ooo/trunk/main/setup_native/scripts/install_solaris.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/env bash
ADD="no"
LINK="no"
Modified: incubator/ooo/trunk/main/setup_native/scripts/mac_install.script
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/setup_native/scripts/mac_install.script?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/setup_native/scripts/mac_install.script (original)
+++ incubator/ooo/trunk/main/setup_native/scripts/mac_install.script Tue Jan 24 15:30:34 2012
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
-# shell script as a workaraound since it is hard to impossible to store compiled
+# shell script as a workaround since it is hard to impossible to store compiled
# applescript in CVS and running osacompile would require a GUI session while
# building (or root privileges)
# using osascript only works when the shell script is camouflaged as application
Modified: incubator/ooo/trunk/main/setup_native/scripts/register_extensions
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/setup_native/scripts/register_extensions?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/setup_native/scripts/register_extensions (original)
+++ incubator/ooo/trunk/main/setup_native/scripts/register_extensions Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
USAGE="Usage: $0"
Modified: incubator/ooo/trunk/main/setup_native/scripts/uninstall_solaris.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/setup_native/scripts/uninstall_solaris.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/setup_native/scripts/uninstall_solaris.sh (original)
+++ incubator/ooo/trunk/main/setup_native/scripts/uninstall_solaris.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# First parameter: Root path that will be removed
# MY_ROOT=/export/home/is/root
Modified: incubator/ooo/trunk/main/setup_native/tests/opensolaris/bundledextensions/send_ooo
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/setup_native/tests/opensolaris/bundledextensions/send_ooo?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/setup_native/tests/opensolaris/bundledextensions/send_ooo (original)
+++ incubator/ooo/trunk/main/setup_native/tests/opensolaris/bundledextensions/send_ooo Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/bin/sh
if [ $# = 0 ]
Modified: incubator/ooo/trunk/main/slideshow/qa/debug/colors.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/slideshow/qa/debug/colors.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/slideshow/qa/debug/colors.sh (original)
+++ incubator/ooo/trunk/main/slideshow/qa/debug/colors.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Output a PS file with a legend for the node state colors
#
@@ -13,4 +13,4 @@ digraph State_Colors
node8 [label="FROZEN",style=filled,fillcolor="0.51986038541995898206292409109363,1.0,1.0"]
node16 [label="ENDED",style=filled,fillcolor="0.69314718055994530941723212145818,1.0,1.0"]
}
-EOF
\ No newline at end of file
+EOF
Modified: incubator/ooo/trunk/main/slideshow/qa/debug/nodetree.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/slideshow/qa/debug/nodetree.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/slideshow/qa/debug/nodetree.sh (original)
+++ incubator/ooo/trunk/main/slideshow/qa/debug/nodetree.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# $Revision: 1.3 $
#
Modified: incubator/ooo/trunk/main/solenv/bin/addsym-macosx.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/addsym-macosx.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/addsym-macosx.sh (original)
+++ incubator/ooo/trunk/main/solenv/bin/addsym-macosx.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# This script is needed in the process of generating exported
# symbols list out of map files on Mac OS X (see also #i69351#)
Modified: incubator/ooo/trunk/main/soltools/testhxx/create.pl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/soltools/testhxx/create.pl?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/soltools/testhxx/create.pl (original)
+++ incubator/ooo/trunk/main/soltools/testhxx/create.pl Tue Jan 24 15:30:34 2012
@@ -32,7 +32,7 @@ if ($ENV{OS} eq 'LINUX') {
$in =~ s!\s+-o\s*\S+! -o /dev/null! || die 'bad input: no -o';
$in =~ s!\S+/testhxx.cxx!-x c++ /proc/self/fd/0!
|| die 'bad input: no source file';
- print STDOUT '#!/bin/bash', "\n";
+ print STDOUT '#!/bin/sh', "\n";
print STDOUT $in,
' <<<"#include \\"`echo $(if [ ${1%/*} != $1 ];then cd ${1%/*};fi;',
'/bin/pwd)/${1##*/}`\\""', "\n";
Modified: incubator/ooo/trunk/main/sysui/desktop/share/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sysui/desktop/share/makefile.mk?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sysui/desktop/share/makefile.mk (original)
+++ incubator/ooo/trunk/main/sysui/desktop/share/makefile.mk Tue Jan 24 15:30:34 2012
@@ -216,7 +216,7 @@ $(COMMONMISC)$/{$(PRODUCTLIST)}$/mimelnk
$(COMMONMISC)$/{$(PRODUCTLIST)}$/create_tree.sh : makefile.mk
$(COMMONMISC)$/{$(PRODUCTLIST)}$/create_tree.sh : $$(@:f)
@@-$(MKDIRHIER) $(@:d)
- @echo "#\!/bin/bash" > $@.$(INPATH)
+ @echo "#\!/bin/sh" > $@.$(INPATH)
@echo "PREFIX=$(UNIXFILENAME.$(@:d:d:f))" >> $@.$(INPATH)
@echo "ICON_PREFIX=$(ICONPREFIX.$(@:d:d:f))" >> $@.$(INPATH)
@echo "ICON_SOURCE_DIR=../../../desktop/icons" >> $@.$(INPATH)
Modified: incubator/ooo/trunk/main/testautomation/tools/run_tests/run_tests.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/tools/run_tests/run_tests.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/tools/run_tests/run_tests.sh (original)
+++ incubator/ooo/trunk/main/testautomation/tools/run_tests/run_tests.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#**************************************************************
#
# Licensed to the Apache Software Foundation (ASF) under one
@@ -41,7 +41,7 @@ sTestTool=""
#------------------------------------------------------------------------
#--- internally used functions ---
#------------------------------------------------------------------------
-function GetValueFromSection ()
+GetValueFromSection ()
# call with NameOfValue Section file
{
$AWK -v sVarName="$1" -v sSectionName="$2" \
Modified: incubator/ooo/trunk/main/toolkit/src2xml/dryrunall.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/src2xml/dryrunall.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/toolkit/src2xml/dryrunall.sh (original)
+++ incubator/ooo/trunk/main/toolkit/src2xml/dryrunall.sh Tue Jan 24 15:30:34 2012
@@ -1,2 +1,2 @@
-#! /bin/bash
+#!/bin/sh
source/src2xml.py --dry-run --includes-from=include.lst $(cat src.lst) "$@"
Modified: incubator/ooo/trunk/main/toolkit/src2xml/sc.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/src2xml/sc.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/toolkit/src2xml/sc.sh (original)
+++ incubator/ooo/trunk/main/toolkit/src2xml/sc.sh Tue Jan 24 15:30:34 2012
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/bin/sh
source/src2xml.py --include-path=$(tr '\n' ':' < include-sc.lst) --dry-run $(cat src-sc.lst) "$@"
Modified: incubator/ooo/trunk/main/toolkit/src2xml/sd.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/src2xml/sd.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/toolkit/src2xml/sd.sh (original)
+++ incubator/ooo/trunk/main/toolkit/src2xml/sd.sh Tue Jan 24 15:30:34 2012
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/bin/sh
source/src2xml.py --include-path=$(tr '\n' ':' < include-sd.lst) --dry-run $(cat src-sd.lst) "$@"
Modified: incubator/ooo/trunk/main/toolkit/src2xml/sw.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/src2xml/sw.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/toolkit/src2xml/sw.sh (original)
+++ incubator/ooo/trunk/main/toolkit/src2xml/sw.sh Tue Jan 24 15:30:34 2012
@@ -1,3 +1,3 @@
-#! /bin/bash
+#!/bin/sh
source/src2xml.py --include-path=$(tr '\n' ':' < include-sw.lst) --dry-run $(cat src-sw.lst) "$@"
Modified: incubator/ooo/trunk/main/writerfilter/source/doctok/cleanupresources
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/writerfilter/source/doctok/cleanupresources?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/writerfilter/source/doctok/cleanupresources (original)
+++ incubator/ooo/trunk/main/writerfilter/source/doctok/cleanupresources Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
TEMP=`mktemp -t cleanupresources`
xsltproc tidyxmi.xsl resources.xmi | xmllint --format - > $TEMP
Modified: incubator/ooo/trunk/main/writerfilter/source/ooxml/status.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/writerfilter/source/ooxml/status.sh?rev=1235297&r1=1235296&r2=1235297&view=diff
==============================================================================
--- incubator/ooo/trunk/main/writerfilter/source/ooxml/status.sh (original)
+++ incubator/ooo/trunk/main/writerfilter/source/ooxml/status.sh Tue Jan 24 15:30:34 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
SEARCHIN=$SRC_ROOT/writerfilter/source/dmapper