Skip to content

Instantly share code, notes, and snippets.

@scottcrawford03
Last active May 30, 2018 21:15
Show Gist options
  • Save scottcrawford03/ed87e60c6ee88d7897822b0023858f69 to your computer and use it in GitHub Desktop.
Save scottcrawford03/ed87e60c6ee88d7897822b0023858f69 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "updating and installing apache"
sudo apt-get update
sudo apt-get install -y apache2
sudo chown -R `whoami`:`id -gn` /var/www/html
sudo apt-get install git
echo "making proj"
mkdir ~/proj
cd ~/proj
git init --bare
cat > hooks/post-receive <<EOF
#!/bin/bash
git --work-tree=/var/www/html --git-dir=/home/demo/proj checkout -f
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment