| 1 | #!/bin/sh |
| 2 | # |
| 3 | # An example hook script to prepare a packed repository for use over |
| 4 | # dumb transports. |
| 5 | # |
| 6 | # To enable this hook, make this file executable by "chmod +x post-update". |
| 7 | |
| 8 | git repack -d |
| 9 | git update-server-info |
| 10 | |
| 11 | # FTP upload |
| 12 | lftp ftp://your-ftp-site/stgit.git -u username,password -e " \ |
| 13 | set ftp:list-empty-ok yes; \ |
| 14 | echo Uploading objects; \ |
| 15 | mirror -RLecv objects objects; \ |
| 16 | echo Uploading refs; \ |
| 17 | mirror -RLecv refs refs; \ |
| 18 | echo Uploading info; \ |
| 19 | mirror -RLecv info info; \ |
| 20 | echo Uploading description; \ |
| 21 | put description -o description; \ |
| 22 | echo Uploading HEAD; \ |
| 23 | put HEAD -o HEAD; \ |
| 24 | exit" |