From 9f9f8d8e630b4c5d7dd3172954fb60f32e68a0f4 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Sun, 19 Mar 2023 13:55:25 +0100 Subject: [PATCH] Fix bashisms makepngs.sh relies on a Bash feature in one of its case statements, ";;&"; this should be made explicit in the shebang. intgamma.sh declares a function in a manner which may fail in non-Bash sh implementations, this patch uses the correct syntax. Based on a patch by Roflcopter4: https://github.com/joncampbell123/dosbox-x/pull/3850 Signed-off-by: Stephen Kitt --- contrib/testpngs/makepngs.sh | 2 +- contrib/tools/intgamma.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/testpngs/makepngs.sh b/contrib/testpngs/makepngs.sh index 270f0630a..f0238c3b5 100755 --- a/contrib/testpngs/makepngs.sh +++ b/contrib/testpngs/makepngs.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # Make a set of test PNG files, MAKEPNG is the name of the makepng executable # built from contrib/libtests/makepng.c diff --git a/contrib/tools/intgamma.sh b/contrib/tools/intgamma.sh index 3198cb241..aaed68a09 100755 --- a/contrib/tools/intgamma.sh +++ b/contrib/tools/intgamma.sh @@ -19,7 +19,7 @@ # Function to print out a list of numbers as integers; the function truncates # the integers which must be one-per-line. -function print(){ +print(){ awk 'BEGIN{ str = "" }