diff options
author | Coleman McFarland <coleman@de.limited> | 2024-04-19 20:32:40 -0400 |
---|---|---|
committer | Coleman McFarland <coleman@de.limited> | 2024-04-19 20:32:40 -0400 |
commit | 70bc7a466ad7251bcb99c81c2ac3fba34a14f630 (patch) | |
tree | cd77c7e3ae5e1c82bf4172e0a82b35d9676cf70b | |
parent | a66b6298963d18b8d1d851d20df6bb8a29fd8e6f (diff) |
-rwxr-xr-x | upload.sh | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -1,9 +1,27 @@ #!/bin/sh -# + +user=coleman +host=mammoth +remote_dir=~/Code/chatops/ # rsync wants trailing / ... i think rsync -aP \ --exclude=.git \ --exclude=buildDir \ --exclude=.idea \ - ./ coleman@mammoth:~/Code/chatops/ + ./ ${user}@${host}:${remote_dir} + +if [ $# -lt 1 ]; then + exit 0 +fi + +CMD=$1 +shift +case $CMD in + install) + ssh ${user}@${host} 'zsh -c "cd ~/Code/chatops; meson compile -C builddir; doas meson install -C builddir; doas rcctl stop chatops; doas rcctl start chatops"' + + ;; + *) + ;; +esac |