Last active
August 29, 2015 14:07
-
-
Save daneden/5a3f7b8531e0b46d7ef9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Navigate to the git repo on the server | |
$command = 'cd /location/of/design-cabin-repo/ '; | |
// Pull changes | |
$command .= '&& git pull '; | |
// Sync changes to the Dropbox folder, deleting files that aren't present in the repo and excluding select files | |
$command .= '&& rsync ./* /location/of/Dropbox/Design\ Cabin/ --delete --exclude=".git"' | |
if($output = shell_exec($command)) { | |
echo "<pre>$output</pre>"; | |
} else { | |
echo "Something went wrong!"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment