From b0c648ad57d138c462fac538c7ea25f88b03e443 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 10 Aug 2020 22:47:18 -0400 Subject: [PATCH 1/2] Revert usage of `read -i` for macOS compat. --- docs/static/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 42089434..ce2fe25d 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -64,10 +64,10 @@ if [ -z "$copy_keymap" ] || [ "$copy_keymap" == "Y" ] || [ "$copy_keymap" == "y" read -e -p "GitHub Username (leave empty to skip GitHub repo creation): " github_user if [ -n "$github_user" ]; then - read -e -i "zmk-config" -p "GitHub Repo Name: " repo_name + read -p "GitHub Repo Name [zmk-config]: " repo_name if [ -z "$repo_name" ]; then repo_name="zmk-config"; fi - read -e -i "https://github.com/${github_user}/${repo_name}.git" -p "GitHub Repo: " github_repo + read -p "GitHub Repo [https://github.com/${github_user}/${repo_name}.git]: " github_repo if [ -z "$github_repo" ]; then github_repo="https://github.com/${github_user}/${repo_name}.git"; fi else From 47dbba21849a136797014f4691c999de28073bf3 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 11 Aug 2020 08:40:13 -0400 Subject: [PATCH 2/2] Fix sed -i usage on macOS, accept 'Y'. --- docs/static/setup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/static/setup.sh b/docs/static/setup.sh index ce2fe25d..27dcb0b3 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -90,7 +90,7 @@ fi echo "" read -p "Continue? [Yn]: " do_it -if [ -n "$do_it" ] && [ "$do_it" != "y" ]; then +if [ -n "$do_it" ] && [ "$do_it" != "y" ] && [ "$do_it" != "Y" ]; then echo "Aborting..." exit fi @@ -108,7 +108,7 @@ fi popd -sed -i \ +sed -i'.orig' \ -e "s/BOARD_NAME/$board/" \ -e "s/SHIELD_NAME/$shield/" \ -e "s/KEYBOARD_TITLE/$shield_title/" \ @@ -116,9 +116,11 @@ sed -i \ if [ "$board" == "proton_c" ]; then # Proton-C board still fa - sed -i -e "s/uf2/hex/g" .github/workflows/build.yml + sed -i'.orig' -e "s/uf2/hex/g" .github/workflows/build.yml fi +rm .github/workflows/*.yml.orig + rm -rf .git git init . git add .