From 34fccb272b618c5c7e0b56935a2550209f5059a8 Mon Sep 17 00:00:00 2001 From: RRM123 Date: Fri, 28 Jan 2022 19:18:33 -0500 Subject: [PATCH] Support Codegen for Git Bash on Windows Resolves #291 Signed-off-by: RRM123 --- api/codegen.sh | 2 ++ tools/bash/add_license_headers.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/api/codegen.sh b/api/codegen.sh index 25bc73dd..066f5f09 100755 --- a/api/codegen.sh +++ b/api/codegen.sh @@ -51,6 +51,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # macOS alias gsed="sed -i ''" elif [[ "$OSTYPE" == "cygwin" ]]; then # POSIX compatible emulation for Windows alias gsed="sed -i" +elif [[ "$OSTYPE" == "msys"* ]]; then # Git Bash (Windows) + alias gsed="sed -i" else echo "FAILED. OS not compatible with script '${BASH_SOURCE[0]}'" exit 1 diff --git a/tools/bash/add_license_headers.sh b/tools/bash/add_license_headers.sh index 02405b83..f8b572e9 100755 --- a/tools/bash/add_license_headers.sh +++ b/tools/bash/add_license_headers.sh @@ -13,6 +13,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # macOS alias gsed="sed -i ''" elif [[ "$OSTYPE" == "cygwin" ]]; then # POSIX compatible emulation for Windows alias gsed="sed -i" +elif [[ "$OSTYPE" == "msys"* ]]; then # Git Bash (Windows) + alias gsed="sed -i" else echo "FAILED. OS not compatible with script '${BASH_SOURCE[0]}'" exit 1