summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2021-03-31 16:27:00 +0200
committerWolfram Sang <wsa+renesas@sang-engineering.com>2021-03-31 16:28:39 +0200
commitcc7f3c21e1174cfe37602c31abf4da8b437b2b93 (patch)
treea500333e435c6384bedf6f06efe0e9f3b4dea01b /scripts
parent7d258e9ce01aa7918e2fe618f715a0f97cdfcaae (diff)
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 <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/pre-commit.sh6
1 files 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"