diff --git a/src/script.sh b/src/script.sh index f99c4f5..3a9d75a 100644 --- a/src/script.sh +++ b/src/script.sh @@ -4,6 +4,20 @@ set -efux -o pipefail + +## Use GNU grep, busybox grep is too slow +. "/etc/os-release" +DISTRO="$ID" + +if [ -z "$(grep --help | grep 'GNU')" ]; then + if [ "$DISTRO" = "alpine" ]; then + echo "Please install GNU grep 'apk add grep'" + exit 1 + fi + alias grep="/usr/bin/grep" +fi + + mkdir -p "tmp/" cd "tmp/"