Skip to content

Commit

Permalink
Merge pull request #516 from tracerrx/bsdsed
Browse files Browse the repository at this point in the history
added check for osx bsd style sed in installer
  • Loading branch information
ty-porter authored Feb 27, 2024
2 parents 2307930 + 78ab6f6 commit 0adc6c4
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 0adc6c4

Please sign in to comment.