|
From: <ai...@us...> - 2009-01-06 19:57:53
|
Revision: 9266
http://plplot.svn.sourceforge.net/plplot/?rev=9266&view=rev
Author: airwin
Date: 2009-01-06 19:57:52 +0000 (Tue, 06 Jan 2009)
Log Message:
-----------
Make "if" syntax more consistent. [ ] preferred to test, string comparisons
done with "=" rather than "==" (that state already exists, but I mention it
because that issue did historically occur for files in the plplot-test
subdirectory), and uniformly apply quotes to second argument of string
comparison.
Modified Paths:
--------------
trunk/scripts/generate_website.sh
trunk/scripts/htdocs-gen_plot-examples.sh
trunk/scripts/make_tarball.sh
Modified: trunk/scripts/generate_website.sh
===================================================================
--- trunk/scripts/generate_website.sh 2009-01-06 19:37:00 UTC (rev 9265)
+++ trunk/scripts/generate_website.sh 2009-01-06 19:57:52 UTC (rev 9266)
@@ -18,11 +18,11 @@
echo ""
echo "Last warning: if you specify 'yes' below, then the '$WEBSITE_PREFIX' directory on the remote host, '$HOSTNAME', will be removed and then replaced."
ANSWER=
-while test "$ANSWER" != "yes" -a "$ANSWER" != "no"; do
+while [ "$ANSWER" != "yes" -a "$ANSWER" != "no" ] ; do
echo -n "Continue (yes/no)? "
read ANSWER
done
-if test "$ANSWER" = "no"; then
+if [ "$ANSWER" = "no" ] ; then
echo "Immediate exit specified!"
exit
fi
Modified: trunk/scripts/htdocs-gen_plot-examples.sh
===================================================================
--- trunk/scripts/htdocs-gen_plot-examples.sh 2009-01-06 19:37:00 UTC (rev 9265)
+++ trunk/scripts/htdocs-gen_plot-examples.sh 2009-01-06 19:57:52 UTC (rev 9266)
@@ -29,22 +29,22 @@
# build=false scripts/htdocs-gen_plot-examples.sh
# Sanity checks.
-if test -z "$WWW_USER"; then
+if [ -z "$WWW_USER" ] ; then
echo "must specify non-empty WWW_USER environment variable"
exit 1
fi
-if test -z "$WWW_GROUP"; then
+if [ -z "$WWW_GROUP" ] ; then
echo "must specify non-empty WWW_GROUP environment variable"
exit 1
fi
-if test -z "$WWW_HOST"; then
+if [ -z "$WWW_HOST" ] ; then
echo "must specify non-empty WWW_HOST environment variable"
exit 1
fi
-if test -z "$WWW_DIR"; then
+if [ -z "$WWW_DIR" ] ; then
echo "must specify non-empty WWW_DIR environment variable"
exit 1
fi
@@ -58,7 +58,7 @@
build=${build:-true}
-if test "$build" = true; then
+if [ "$build" = "true" ] ; then
rm -rf htdocsgen/build_dir htdocsgen/install
mkdir -p htdocsgen/build_dir htdocsgen/install
cd htdocsgen/build_dir
@@ -86,14 +86,14 @@
for exe in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 \
23 24 25 26 27 28 29 30; do
- if test $exe = 08 -o $exe = 16 -o $exe = 20 -o $exe = 30; then
+ if [ $exe = "08" -o $exe = "16" -o $exe = "20" -o $exe = "30" ] ; then
# The default cairo graphics AA looks good for these examples now
# since Werner's filled_polygon change to the cairo driver so no need
# to explicitly turn graphics AA off any more with
# DRIVEROPT='-drvopt graphics_anti_aliasing=1'
DRIVEROPT=
else
- if test $exe = 09 -o $exe = 21; then
+ if [ $exe = "09" -o $exe = "21" ] ; then
# Text clipping.
DRIVEROPT='-drvopt text_clipping=1'
else
@@ -135,7 +135,7 @@
examples/python/xw${exe}.py \
examples/tcl/x${exe}.tcl \
; do
- if test -f $f ; then
+ if [ -f $f ] ; then
$CP $f $EXDIR/demo${exe}
else
echo Example `basename $f` is not yet available \
Modified: trunk/scripts/make_tarball.sh
===================================================================
--- trunk/scripts/make_tarball.sh 2009-01-06 19:37:00 UTC (rev 9265)
+++ trunk/scripts/make_tarball.sh 2009-01-06 19:57:52 UTC (rev 9266)
@@ -116,7 +116,7 @@
${PREBUILD_ARG} ${DOC_ARG} \
-DWWW_USER:STRING=${WWW_USER} ../plplot >& cmake.out \
&& echo "Making distribution." \
- && (if test "$do_prebuild_dist" = yes; then
+ && (if [ "$do_prebuild_dist" = "yes" ] ; then
make ${make_opt} prebuild_dist >& make_prebuild_dist.out
fi) \
&& make ${make_opt} package_source >& make_package_source.out \
@@ -125,7 +125,7 @@
&& mv $TARBALL .. \
&& cd .. \
&& echo "distribution tarball: $TARBALL" \
- && test "$do_check" = yes \
+ && test "$do_check" = "yes" \
&& tar xfz $TARBALL \
&& mkdir ctest_build_dir \
&& ( cd ctest_build_dir \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|