From 28665989e8abc06514ecb85d5ce572a8f8161a5a Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Tue, 4 Aug 2020 05:36:09 +0200 Subject: [PATCH] Add disclaimer if nothing was archived --- install.conf.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.conf.yaml b/install.conf.yaml index 8de8855..5892841 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -4,7 +4,7 @@ description: Pulling all submodules stdout: true - - command: /bin/sh -c 'tmpd="$(mktemp -d)"; for file in .config/*; do [ ! -e "$HOME/$file" ] || mv "$HOME/$file" "$tmpd"; done; rmdir "$tmpd" 2>/dev/null || { name="existing-$(date +"%s").tar.gz"; tar czvf "$name" "$tmpd" && rm -rf "$tmpd" && echo "$name created"; }' + command: /bin/sh -c 'tmpd="$(mktemp -d)"; for file in .config/*; do [ ! -e "$HOME/$file" ] || mv "$HOME/$file" "$tmpd"; done; rmdir "$tmpd" 2>/dev/null && echo "Nothing to archive" || { name="existing-$(date +"%s").tar.gz"; tar czvf "$name" "$tmpd" && rm -rf "$tmpd" && echo "$name created"; }' description: Archiving all files in ~/.config before overwriting them stdout: true stderr: true