Skip to content

Instantly share code, notes, and snippets.

@dannygsmith
Last active October 3, 2017 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannygsmith/a7b5044c272755d121b63021e83429e4 to your computer and use it in GitHub Desktop.
Save dannygsmith/a7b5044c272755d121b63021e83429e4 to your computer and use it in GitHub Desktop.
Bash script to prepare for installing laravel valet
#!/usr/bin/env bash
# create the folder
mkdir "${HOME}/bin"
cd "${HOME}/bin"
# create the empty files
touch valet-list
touch valet-destroy
touch valet-install
touch valetStart
touch valetStop
touch wp-create
touch wp-drop
touch wp-db-backup
touch wp-db-restore
touch wp-daily-backups
touch wp-hosts-secure
touch hosts.txt
# change the permissions so you can execute the files
chmod 700 valet-list
chmod 700 valet-destroy
chmod 700 valet-install
chmod 700 valetStart
chmod 700 valetStop
chmod 700 wp-create
chmod 700 wp-drop
chmod 700 wp-db-backup
chmod 700 wp-db-restore
chmod 700 wp-daily-backups
chmod 700 wp-hosts-secure
# add bin to your path
echo $'\n\nexport PATH="$PATH:$HOME/bin"' >> ~/.bash_profile
export PATH="$HOME/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment