2015-04-07 20:18:11 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2015-04-07 23:07:01 +00:00
|
|
|
# usage: ./deploy HOST [[USER@]HOST]
|
2015-04-07 20:18:11 +00:00
|
|
|
#
|
|
|
|
set -euf
|
|
|
|
|
2015-05-20 23:56:08 +00:00
|
|
|
PATH="$PWD/bin${PATH+:$PATH}"
|
|
|
|
export PATH
|
2015-04-07 20:18:11 +00:00
|
|
|
|
|
|
|
user=root
|
|
|
|
host=$1
|
|
|
|
|
2015-04-07 23:07:01 +00:00
|
|
|
config=./modules/$host/default.nix
|
2015-04-07 20:18:11 +00:00
|
|
|
target=${2-$user@$host}
|
|
|
|
|
2015-05-20 23:56:08 +00:00
|
|
|
exec ssh-deploy "$config" "$target"
|