File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
package/scripts/macos/pkg Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
33if [[ $EUID -eq 0 ]]; then
4+
5+ # # Add to paths.d
6+ echo " $2 /bin" > /etc/paths.d/quarto
7+
8+ # # Add symlink
49ln -fs $2 /bin/quarto /usr/local/bin/quarto
10+
511else
612
7- # write path to zshenv
8- EXPORTLINE=' export PATH="' $2 ' /bin:$PATH"'
9- EXPORTFILE=~ /.zshenv
13+ # write path to zshrc
14+ touch " ${HOME} /.zshrc"
1015
11- # Add the path to the zshenv if it doesn't already exist
12- grep -qxF " $EXPORTLINE " " $EXPORTFILE " || echo " $EXPORTLINE " >> " $EXPORTFILE "
16+ BINDIR=$2 /bin
17+ EXPORTLINE=' # Add quarto to the path
18+ if [[ -d ' $BINDIR ' ]]; then
19+ export PATH="' $BINDIR ' :$PATH"
20+ fi'
21+ # Add the path to the zshrc if it doesn't already exist
22+ grep -qxF " $EXPORTLINE " " ${HOME} /.zshrc" || echo " $EXPORTLINE " >> " ${HOME} /.zshrc"
1323
1424# try creating symlink, its ok if this doesn't work
1525ln -fs $2 /bin/quarto /usr/local/bin/quarto
You can’t perform that action at this time.
0 commit comments