From 78ab6f62172428e6233c040662c86fe777373213 Mon Sep 17 00:00:00 2001 From: Nicholas Saraniti Date: Tue, 20 Feb 2024 20:24:08 -0500 Subject: [PATCH] added check for osx bsd style sed in installer --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 98d9ec5f..88633d58 100755 --- a/install.sh +++ b/install.sh @@ -102,7 +102,9 @@ if [ "$SKIP_VENV" = false ]; then if ! grep -q "#\!/" main.py; then - if [ "$NO_SUDO" = false ]; 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 else sed -i "1i #\!$(which python3)" main.py