install-web-files.fish 506 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/fish
  2. # Aim at deploying on local httpd server
  3. # Check existence of deployment target
  4. if not set -q WEBLAND_WEB_DEPLOY_PATH
  5. exit 1
  6. end
  7. set destinationPath $WEBLAND_WEB_DEPLOY_PATH
  8. if not test -e $destinationPath
  9. exit 2
  10. end
  11. # Check existence of source
  12. if not set gitTopLevel (git rev-parse --show-toplevel)
  13. exit 3
  14. end
  15. set sourcePath $gitTopLevel/web/
  16. if not test -e $sourcePath
  17. exit 4
  18. end
  19. # Deploy
  20. rsync --perms --recursive --verbose --delete-after $sourcePath $destinationPath
  21. exit 0