Instantly share code, notes, and snippets.

Embed
What would you like to do?
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