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