#!/bin/bash # ━━━━━━━ # publish - Update the Web server’s copy of my public files # ━━━━━━━ mountpoint=/mnt/lan/server/unbak if [[ ! $(findmnt --mountpoint "$mountpoint") ]]; then sudo mount $mountpoint/ || exit 1 was_mounted_here=1 fi # Update the copies # ───────────────── sudo --user=public sync-web # Update the images of the Breccian copies # ───────────────── if false; then cd ~/work/ # Build the imaging software, pending build persistence. build Java class-files build Breccia/Web/imager class-files build wayic/Web/imager class-files sudo --preserve-env=JDK_HOME --user=public \ wayic/Web/imager/bin/image $mountpoint/var/www/public/htdocs # --preserve-env Retain my `JDK_HOME` variable for the shebang of the `image` command. fi [ $was_mounted_here ] && sudo umount $mountpoint/