Mac is a script to set up a macOS computer for web development and to keep it up to date.
If you want - the script also lightly customizes your shell prompt so that it displays your current directory in orange.
- On a fresh OS install ... use safari to download this repo as a zip file.
- Extract the repo to
~/Development/mac
- Navigate to
~/Development/mac
on the command line and runbash mac
or./mac
Define a new color variable using any of the 256 possible Xterm colors. For example:
BLUE=$(tput setaf 190)
Then in the line that contains PS1=
, replace {ORANGE}
or {GREEN}
with
{BLUE}
. Save the file, then open a new Terminal window or tab to see the changes.
The script does not automatically launch these services after installation because you might not need or want them to be running. With Homebrew Services, starting, stopping, or restarting these services is as easy as the command below. If you insist on having brew services init on boot, configure a LaunchAgent entry for the service you want to start.
brew services start|stop|restart [name of service]
For example:
brew services start postgresql
To see a list of all installed services:
brew services list
To start all services at once:
brew services start --all
-
Find out which shell you're currently running:
echo $SHELL
-
Find out the location of the shell you want to switch to. For example, if you want to switch to
bash
, runwhich bash
. -
Verify if the shell location is included in
/etc/shells
. Runcat /etc/shells
to see the contents of the file. -
If the location of the shell is included, run
chsh -s [the location of the shell]
. For example, ifwhich bash
returned/bin/bash
, you would runchsh -s /bin/bash
.If the location of the shell is not in
/etc/shells
, add it, then run thechsh
command. If you have Sublime Text, you can open the file by runningsubl /etc/shells
.