From 72a4a19017fe8c7fb0898c0ffa3d3d614434bbe7 Mon Sep 17 00:00:00 2001 From: alandefreitas Date: Wed, 3 May 2023 19:12:45 -0300 Subject: [PATCH] commit id uses 7 first chars --- libdoc.sh | 2 +- sitedoc.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libdoc.sh b/libdoc.sh index 31b05d9f..c055822c 100755 --- a/libdoc.sh +++ b/libdoc.sh @@ -57,7 +57,7 @@ fi if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then commit_id=$(git rev-parse HEAD) - commit_id=$(expr substr "$commit_id" $(expr length "$commit_id" - 7) 8) + commit_id=$(expr substr "$commit_id" 1 7) else commit_id="" fi diff --git a/sitedoc.sh b/sitedoc.sh index 0a4ad329..a1e67745 100755 --- a/sitedoc.sh +++ b/sitedoc.sh @@ -52,7 +52,7 @@ fi if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then commit_id=$(git rev-parse HEAD) - commit_id=$(expr substr "$commit_id" $(expr length "$commit_id" - 7) 8) + commit_id=$(expr substr "$commit_id" 1 7) else commit_id="" fi