summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColeman McFarland <coleman@de.limited>2024-04-19 20:32:40 -0400
committerColeman McFarland <coleman@de.limited>2024-04-19 20:32:40 -0400
commit70bc7a466ad7251bcb99c81c2ac3fba34a14f630 (patch)
treecd77c7e3ae5e1c82bf4172e0a82b35d9676cf70b
parenta66b6298963d18b8d1d851d20df6bb8a29fd8e6f (diff)
deploy script worksHEADmain
-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