summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-08-06 00:58:07 +0200
committertv <tv@shackspace.de>2015-08-06 00:58:07 +0200
commit0fc9cbeba4060380f698f51bb74081e2fcefadf3 (patch)
tree697a7fa1efd8f76f5e2f6a61153d9e7d3aee3afd
parent07ef31c50613634e88a31233d1fcd2ec3e52bfe8 (diff)
cac pushconfig: RIP
-rwxr-xr-xcac49
1 files changed, 0 insertions, 49 deletions
diff --git a/cac b/cac
index 2fb4598..3f6e501 100755
--- a/cac
+++ b/cac
@@ -232,34 +232,6 @@ __cac_cli__powerop() {(
_cac_handle_reply 'cac powerop' "$reply"
)}
-#? cac pushconfig SERVERSPEC [PREFIX=/]
-#?
-__cac_cli__pushconfig() {(
- server=$(__cac_cli__getserver "$1")
-
- prefix=${2-/}
-
- hostname=$(echo $server | jq -r .label)
-
- address=$(echo $server | jq -r .ip)
- target=root@$address
-
- RSYNC_RSH='sshpass -e ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
- SSHPASS=$(echo $server | jq -r .rootpass)
- export RSYNC_RSH SSHPASS
-
- pushgit . $target:$prefix/etc/nixos/
- pushgit hosts $target:$prefix/etc/nixos/hosts/
- pushgit tmp/nixpkgs/$hostname $target:$prefix/etc/nixos/nixpkgs/
- pushdir secrets/$hostname/nix $target:$prefix/etc/nixos/secrets/
- pushdir secrets/$hostname/rsync $target:$prefix/
- echo "_:{imports=[./modules/$hostname];}" \
- | $RSYNC_RSH "$target" tee "$prefix/etc/nixos/configuration.nix" \
- > /dev/null
-
- ## TODO chmod and chown secrets
-)}
-
#? cac setlabel SERVERSPEC LABEL
#?
__cac_cli__setlabel() {(
@@ -436,27 +408,6 @@ rsyncfiles() {(
)}
-# gitfiles : git-work-tree -> lines filename
-gitfiles() {
- git -C "$1" archive --format=tar HEAD | tar t | sed '/\/$/d'
-}
-
-# pushgit : git-work-tree x rsync-target -> ?
-pushgit() {
- gitfiles "$1" | rsyncfiles "$1" "$2"
-}
-
-# dirfiles : local-dir -> lines filename
-dirfiles() {(
- cd "$1"
- find . -type f | sed 's/^\.\///'
-)}
-
-# pushdir : local-dir x rsync-target -> ?
-pushdir() {
- dirfiles "$1" | rsyncfiles "$1" "$2"
-}
-
_cac_handle_reply() {(