https://github.com/zimoun/hello-example.git
Raw File
Tip revision: bcab3b91bd3fdbcbd9c99aa1560307ece51834bb authored by zimoun on 20 July 2020, 11:45:36 UTC
add named tag.
Tip revision: bcab3b9
hello-1
#! /bin/sh
# Test standard GNU greeting.
#
# Copyright (C) 2001, 2006, 2014 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# This script takes one argument.

trap 'rm -fr $tmpfiles' 1 2 3 15

# We force the C locale here, since we are checking normal output,
# which will be translated.

LANGUAGE=
LC_ALL=C
LC_MESSAGES=
LANG=
export LANGUAGE LC_ALL LC_MESSAGES LANG

tmpfiles="hello-test1.ok"
cat <<EOF > hello-test1.ok
Hello, world!
EOF

tmpfiles="$tmpfiles hello-test1.out"
: ${HELLO=hello}
${HELLO}  | tr -d '\r' >hello-test1.out

: ${DIFF=diff}
${DIFF} hello-test1.ok hello-test1.out
result=$?

rm -fr $tmpfiles

exit $result
back to top