install-to-exe.sh
1#!/bin/bash
2set -e
3
4host="$1"
5[[ -z "$host" ]] && {
6 echo "usage: $0 <hostname>"
7 exit 1
8}
9[[ "$host" != *.* ]] && host="$host.exe.xyz"
10
11make build-linux-x86
12cat bin/shelley-linux-x86 | ssh "$host" "sudo mv /usr/local/bin/shelley /usr/local/bin/shelley.old; sudo tee /usr/local/bin/shelley > /dev/null && sudo chmod +x /usr/local/bin/shelley && sudo systemctl restart shelley"