123456789101112131415161718192021222324252627282930 |
- #!/usr/bin/fish
- # Aim at deploying on local httpd server
- set fish_trace 1
- # 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 --recursive --verbose --delete-after $sourcePath $destinationPath
- exit 0
|