Skip to content

Instantly share code, notes, and snippets.

@nikosolihin
Last active August 28, 2016 16:14
Show Gist options
  • Save nikosolihin/7b4eabe087ccec339eca6d8e60d1c56f to your computer and use it in GitHub Desktop.
Save nikosolihin/7b4eabe087ccec339eca6d8e60d1c56f to your computer and use it in GitHub Desktop.
Prepare server
#!/bin/bash
cd
# Install composer
curl -sS https://getcomposer.org/installer | php
chmod +x composer.phar
echo "alias composer='~/composer.phar'" >> .bashrc
source .bashrc
# Create the git directory with a bare repo to push to
mkdir .git && cd $_
git init --bare
# Configure the hook
cd hooks
wget -O post-receive https://gist.githubusercontent.com/nikosolihin/63b1c0fc19aaff935f53f3aafdb393e9/raw/b60c3e98e5c359a0013dbbfd6a683ad1443d226e/post-receive
chmod +x post-receive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment