diff options
author | EuAndreh <eu@euandre.org> | 2019-06-02 12:19:58 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-02 12:21:47 -0300 |
commit | 323892f73860f254242a7000fb336015798deff7 (patch) | |
tree | 7d71e6d5d8d212408d86aa95c6a48b0e90a0c679 /utils.nix | |
parent | Use ~/tmp/backup/ for backing up ad-hoc data (diff) | |
download | dotfiles-323892f73860f254242a7000fb336015798deff7.tar.gz dotfiles-323892f73860f254242a7000fb336015798deff7.tar.xz |
Parameterize the overwriting of docs publishing
Diffstat (limited to 'utils.nix')
-rw-r--r-- | utils.nix | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -85,11 +85,11 @@ in rec { touch $out ''; }); - overwritingPublishScript = docsDerivation: + overwritingPublishScript = { docsDerivation, overwrite ? true }: pkgs.writeShellScriptBin "publish.sh" '' set -euo pipefail OUT_DOCS="${docsDerivation}" - ${pkgs.openssh}/bin/ssh -o StrictHostKeyChecking=no "$SERVER_URL" rm -rf "$DOCS_SERVER_PATH/*" + ${if overwrite then "# " else ""}${pkgs.openssh}/bin/ssh -o StrictHostKeyChecking=no "$SERVER_URL" rm -rf "$DOCS_SERVER_PATH/*" ${pkgs.rsync}/bin/rsync -avzP \ --rsh="ssh -o StrictHostKeyChecking=no" \ "$OUT_DOCS/" \ |