Update the programming style of yet more scripts.

This commit is contained in:
Zoltan Somogyi
2023-10-02 15:02:53 +11:00
parent f369aeeba8
commit 4e90f2d238
4 changed files with 15 additions and 11 deletions

View File

@@ -21,7 +21,7 @@
usage="Usage: canonical_grade --grade <actual>"
while :
while true
do
case "$1" in
# include the file `parse_grade_options.sh-subr'
@@ -38,9 +38,9 @@ do
shift
done
if test $# -ne 0
if test "$#" -ne 0
then
echo "$usage"
echo "${usage}"
exit 1
fi
@@ -50,5 +50,5 @@ fi
# include the file `canonical_grade.sh-subr'
@CANONICAL_GRADE@
echo $GRADE
echo ${GRADE}
exit 0

View File

@@ -20,7 +20,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
PATH=@bindir@:$PATH
PATH=@bindir@:${PATH}
export PATH
# Use less heap at the expense of increased time spent in the GC.
@@ -28,7 +28,7 @@ export PATH
if false
then
MERCURY_OPTIONS_mdprof_cgi="--boehm-gc-free-space-divisor 10 \
${MERCURY_OPTIONS_mdprof_cgi}"
${MERCURY_OPTIONS_mdprof_cgi}"
export MERCURY_OPTIONS_mdprof_cgi
fi

View File

@@ -16,9 +16,9 @@
# ENVIRONMENT VARIABLES: MERCURY_MKNOD
MKNOD=${MERCURY_MKNOD=@MKNOD@}
if test $# -ne 1
if test "$#" -ne 1
then
echo "Usage: `basename $0` filename" 1>&2
exit 1
fi
exec $MKNOD "$1" p
exec ${MKNOD} "$1" p

View File

@@ -19,7 +19,11 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
MPROF=${MERCURY_PROFILER="@bindir@/mercury_profile"}
case $# in
0) exec $MPROF ;;
*) exec $MPROF "$@" ;;
case "$#" in
0)
exec ${MPROF}
;;
*)
exec ${MPROF} "$@"
;;
esac