X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=util%2Fnew_project.sh;h=9dec714b02a2160849cd2531f6396a5bf260e156;hb=395a7793d1c39053e95a699b4c5dc6ae9c304584;hp=d1d1ed82ca3848337164d72211c5bb917cc5a2cf;hpb=2bb2977c133646c4e056960e72029270d77cc1eb;p=qmk_firmware.git diff --git a/util/new_project.sh b/util/new_project.sh index d1d1ed82c..9dec714b0 100755 --- a/util/new_project.sh +++ b/util/new_project.sh @@ -43,7 +43,11 @@ GIT=$(whereis git) if [ "$GIT" != "" ]; then IS_GIT_REPO=$($GIT log >>/dev/null 2>&1; echo $?) if [ "$IS_GIT_REPO" -eq 0 ]; then - ID="'$($GIT config --get user.name)'" + ID="$($GIT config --get user.name)" + read -rp "What is your name? [$ID] " YOUR_NAME + if [ -n "$YOUR_NAME" ]; then + ID=$YOUR_NAME + fi echo "Using $ID as user name" for i in "$NEW_KBD/config.h" \ @@ -52,7 +56,7 @@ if [ "$GIT" != "" ]; then "$NEW_KBD/keymaps/default/config.h" \ "$NEW_KBD/keymaps/default/keymap.c" do - awk -v id="$ID" '{sub(/REPLACE_WITH_YOUR_NAME/,id); print}' < "$i" > "$i.$$" + awk -v id="$ID" '{sub(/%YOUR_NAME%/,id); print}' < "$i" > "$i.$$" mv "$i.$$" "$i" done fi