From c705fdfff019409403d401a25cd6178e10b54ba1 Mon Sep 17 00:00:00 2001 From: Susis Strolch Date: Sat, 14 Apr 2018 15:51:09 +0200 Subject: [PATCH] add missing & around value --- hooks/post-checkout | 2 +- hooks/post-commit | 2 +- hooks/post-merge | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/post-checkout b/hooks/post-checkout index 00a2a7e0a..117b7b390 100755 --- a/hooks/post-checkout +++ b/hooks/post-checkout @@ -8,4 +8,4 @@ GLOBAL_H=${WORKDIR}/ESPEasy-Globals.h # update BUILD_GIT on branch checkout [[ $3 == 1 && -f ${CUSTOM_H} ]] && \ - sed -i.bak -e "s/\(#define BUILD_GIT\).*/\1 $(git log -1 --pretty=format:%h HEAD)/" ${CUSTOM_H} + sed -i.bak -e "s/\(#define BUILD_GIT\).*/\1 \"$(git log -1 --pretty=format:%h HEAD)\"/" ${CUSTOM_H} diff --git a/hooks/post-commit b/hooks/post-commit index e324884c3..2feb5ee2a 100755 --- a/hooks/post-commit +++ b/hooks/post-commit @@ -7,4 +7,4 @@ CUSTOM_H=${WORKDIR}/Custom.h GLOBAL_H=${WORKDIR}/ESPEasy-Globals.h [[ -f ${CUSTOM_H} ]] && \ -sed -i.bak -e "s/\(#define BUILD_GIT\).*/\1 $(git log -1 --pretty=format:%h HEAD)/" ${CUSTOM_H} +sed -i.bak -e "s/\(#define BUILD_GIT\).*/\1 \"$(git log -1 --pretty=format:%h HEAD)\"/" ${CUSTOM_H} diff --git a/hooks/post-merge b/hooks/post-merge index e86deb637..db3d0f35e 100755 --- a/hooks/post-merge +++ b/hooks/post-merge @@ -12,7 +12,7 @@ GLOBAL_H=${WORKDIR}/ESPEasy-Globals.h # we expect that ${CUSTOM_H} always contains a "#define BUILD_GIT" macro [[ -f ${CUSTOM_H} ]] && ( echo "post_merge: change BUILD_GIT" -sed -i.bak -e "s/\(#define BUILD_GIT\).*/\1 $(git log -1 --pretty=format:%h HEAD)/" ${CUSTOM_H} +sed -i.bak -e "s/\(#define BUILD_GIT\).*/\1 \"$(git log -1 --pretty=format:%h HEAD)\"/" ${CUSTOM_H} ) # uncomment if you don't want to use the Custom.h include