From 9e563b92ead1091f761b3be04f67691d2af8910a Mon Sep 17 00:00:00 2001 From: Tyler Porter Date: Wed, 28 Feb 2024 01:29:25 -0500 Subject: [PATCH] Update install.sh --- install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 2e131fa8..8f4036aa 100755 --- a/install.sh +++ b/install.sh @@ -100,19 +100,21 @@ if [ "$SKIP_VENV" = false ]; then fi source ./venv/bin/activate - if ! grep -q "#\!/" main.py; then if [[ "$OSTYPE" == "darwin"* ]]; then sed -i '' '1i\'$'\n''#!'"$(which python3)"$'\n' main.py elif [ "$NO_SUDO" = false ]; then - sed -i "1i #\!/usr/bin/sudo $(which python3)" main.py + sed -i "1i #\!/usr/bin/sudo $(which python3)" main.py else - sed -i "1i #\!$(which python3)" main.py + sed -i "1i #\!$(which python3)" main.py fi chmod +x main.py if ! grep -q "noshebang" ./.git/config; then + # Add template to .git/config, and trigger the filter by adding the file. + # After that, the shebang should be ignored. cat .git-config-template >> .git/config + git add main.py fi fi fi