1234567891011121314151617181920212223242526272829 |
- #!/usr/bin/fish
- # Aim at deploying on local httpd server
- # Check existence of deployment target
- if not set -q WEBLAND_WEB_DEPLOY_PATH
- exit 1
- end
- set destinationPath $WEBLAND_WEB_DEPLOY_PATH
- if not test -e $destinationPath
- exit 2
- end
- # Check existence of source
- if not set gitTopLevel (git rev-parse --show-toplevel)
- exit 3
- end
- set sourcePath $gitTopLevel/web/
- if not test -e $sourcePath
- exit 4
- end
- # Deploy
- rsync --perms --recursive --verbose --delete-after $sourcePath $destinationPath
- exit 0
|