PROG="${0##*/}"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
. shell-error
. shell-args
. shell-quote
+. aiaiai-sh-functions
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
echo
}
+# Check if dash is available and we are not running in dash
+can_switch_to_dash()
+{
+ if command -v "dash" >/dev/null 2>&1; then
+ if [ -n "${BASH_VERSION:-}" ]; then
+ return 0
+ fi
+ fi
+
+ return 1
+}
+
# Die if a program is not in PATH
# Usage: program_required <program_name>
program_required()
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
. shell-error
. shell-signal
+. aiaiai-sh-functions
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
PROG="${0##*/}"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
PROG="${0##*/}"
export message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF
. shell-quote
. aiaiai-sh-functions
+PROG="aiaiai-jenkins-test-patchset"
message_time="yes"
+# This is a small trick to make sure the script is portable - check if 'dash'
+# is present, and if yes - use it.
+if can_switch_to_dash; then
+ exec dash -euf -- "$srcdir/$PROG" "$@"
+ exit $?
+fi
+
show_usage()
{
cat <<-EOF