diff --git a/conf/remote.sh.inc b/conf/remote.sh.inc new file mode 100644 index 0000000..907e050 --- /dev/null +++ b/conf/remote.sh.inc @@ -0,0 +1,13 @@ +#!/bin/echo Do not run + +# Config file for remote_deploy script +# All values are required +# This file is directly sourced from the script +# Put this file to $XDG_CONFIG_DIR/wish/ and tweak. + +# Remote username +USER=... +# Host Wish is deployed on +HOST=... +# Remote directory containing this repository +DIR=... diff --git a/remote_deploy.sh b/remote_deploy.sh new file mode 100755 index 0000000..7496dc8 --- /dev/null +++ b/remote_deploy.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -eu + +if test -v XDG_CONFIG_DIR; then + CFGDIR="$XDG_CONFIG_DIR" +else + CFGDIR="$HOME/.config" +fi + +# Drop pre-existing values +USER= +HOST= +DIR= + +. "$CFGDIR/wish/remote.sh.inc" + +ssh -l "$USER" "$HOST" -t " + set -eu + cd $DIR + ./deploy.sh + "