1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

mkdist: avoid echo

According to SUSv3, "New applications are encouraged to use printf
instead of echo."
This commit is contained in:
Kalle Olavi Niemitalo 2008-06-30 16:14:49 +03:00 committed by Kalle Olavi Niemitalo
parent 7e7cf3940a
commit 80aa801e6a

View File

@ -20,10 +20,12 @@
# set -x # set -x
echo "-------------------------------------------------" cat <<EOF
echo "Date: $(date)" -------------------------------------------------
echo "Args: $*" Date: $(date)
echo "-------------------------------------------------" Args: $*
-------------------------------------------------
EOF
# Variables used in this script: # Variables used in this script:
# $GIT_DIR = option -g GIT_DIR; passed in environment to Git # $GIT_DIR = option -g GIT_DIR; passed in environment to Git
@ -55,30 +57,30 @@ do
(d) docdir=$OPTARG ;; (d) docdir=$OPTARG ;;
(o) outdir=$OPTARG ;; (o) outdir=$OPTARG ;;
("?") exit 1 ;; ("?") exit 1 ;;
(*) echo >&2 "$0:$LINENO: bug found" (*) printf >&2 "%s:%d: bug found\n" "$0" "$LINENO"
exit 1 ;; exit 1 ;;
esac esac
done done
if [ $OPTIND -le $# ] if [ $OPTIND -le $# ]
then then
echo >&2 "$0: too many non-option arguments" printf >&2 "%s: too many non-option arguments\n" "$0"
exit 1 exit 1
fi fi
if [ -z "$GIT_DIR" ] if [ -z "$GIT_DIR" ]
then then
echo >&2 "$0: Must specify -g GIT_DIR option" printf >&2 "%s: Must specify -g GIT_DIR option\n" "$0"
exit 1 exit 1
fi fi
if [ -z "$outdir" ] if [ -z "$outdir" ]
then then
echo >&2 "$0: Must specify -o OUTDIR option" printf >&2 "%s: Must specify -o OUTDIR option\n" "$0"
exit 1 exit 1
fi fi
if [ -z "$rev" ] if [ -z "$rev" ]
then then
echo >&2 "$0: Must specify -r REVISION option" printf >&2 "%s: Must specify -r REVISION option\n" "$0"
exit 1 exit 1
fi fi
if [ -z "$label" ] if [ -z "$label" ]