Skip to content

Commit

Permalink
added check for osx bsd style sed in installer
Browse files Browse the repository at this point in the history
  • Loading branch information
tracerrx committed Feb 21, 2024
1 parent 32f5c80 commit 78ab6f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78ab6f6

Please sign in to comment.