1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/bin/sh # Example post-receive hook for git repositories # Install this in your repo's hooks directory: /var/git/your-repo.git/hooks/post-receive # Make it executable: chmod +x /var/git/your-repo.git/hooks/post-receive # Get the repository name (remove .git extension) REPO_NAME=$(basename "$PWD" .git) # Output directory for generated HTML OUTPUT_DIR="/var/www/git/$REPO_NAME" # Repository description (optional) DESCRIPTION="A cool project" # Generate the static site /var/git/gituwa "$PWD" "$OUTPUT_DIR" "$DESCRIPTION" echo "Generated static site at $OUTPUT_DIR" |