From cc7f3c21e1174cfe37602c31abf4da8b437b2b93 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 31 Mar 2021 16:27:00 +0200 Subject: scripts: pre-commit: fix recursive loop uuid calls uuid calls uuid calls uuid... Rename the shell function. Fixes: 4d03227 ("scripts: pre-commit: Support uuidgen as an alternative to uuid") Signed-off-by: Wolfram Sang --- scripts/pre-commit.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pre-commit.sh b/scripts/pre-commit.sh index 2ea61c9..afcd09c 100755 --- a/scripts/pre-commit.sh +++ b/scripts/pre-commit.sh @@ -2,7 +2,7 @@ set -e -uuid() { +_uuid() { if which uuid >/dev/null 2>&1 ; then uuid else @@ -25,10 +25,10 @@ do # Generate unique key if missing if ! grep -q ^key: "$i" then - key=$(uuid) + key=$(_uuid) while grep -qrw "$key" . do - key=$(uuid) + key=$(_uuid) done echo "Generated key $key for $i" sed -i "/^team:/akey: $key" "$i" -- cgit v1.2.3