summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xupload.sh22
1 files changed, 20 insertions, 2 deletions
diff --git a/upload.sh b/upload.sh
index 2e3399c..7ec84cd 100755
--- a/upload.sh
+++ b/upload.sh
@@ -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