Skip to content

Instantly share code, notes, and snippets.

@LucasMali
LucasMali / sphp.sh
Last active Mar 24, 2021 — forked from rhukster/sphp.sh
Easy Brew PHP version switching
View sphp.sh
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
# Modified: Lucas Maliszewski
# TODO: Add flag to reload apache
# TODO: Add flag to reload nginx
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)