diff options
-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 |