Docker image which provides a full Eressea installation to host a local game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
727 B

3 weeks ago
  1. --- backup-eressea.org 2020-12-03 19:01:33.947594665 +0000
  2. +++ backup-eressea 2020-12-03 19:39:46.489607175 +0000
  3. @@ -3,12 +3,21 @@
  4. ERESSEA=$HOME/eressea
  5. echo "The ERESSEA environment variable is not set. Assuming $ERESSEA."
  6. fi
  7. +
  8. GAME=$1
  9. +# script can have 3 parameters
  10. +# $1 = game number
  11. +# $2 = turn
  12. +# $3 = upload url
  13. +# the upload url and hence the upload it only done, if all three parameter are given
  14. +[ -n $3 ] && UPLOAD_WEBDAV_URL=$3
  15. +
  16. upload() {
  17. + [ -z $UPLOAD_WEBDAV_URL ] && return
  18. SRC="$1"
  19. DST=$(basename "$SRC")
  20. - echo put "$SRC" "$DST" | cadaver "https://dav.box.com/dav/Eressea/game-$GAME/"
  21. + echo put "$SRC" "$DST" | cadaver "$UPLOAD_WEBDAV_URL"
  22. }
  23. if [ ! -d $ERESSEA/game-$GAME ]; then