dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 62f13b8e1499c93a0faca76cc8078c74f14f856c
parent 5914f403ef96de93ea28e60ef90b9c933e8de936
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue,  3 Mar 2020 16:42:31 +0100

Add check to avoid overwriting files when getting uploads

Diffstat:
M.local/bin/upload | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/.local/bin/upload b/.local/bin/upload @@ -128,6 +128,9 @@ upload_file() { download_file() { url="https://$host/npub/$1" + if [ -e "$1" ]; then + die "error: file '$1' already exists, aboring" + fi if command -v hurl >/dev/null 2>&1; then hurl "$url" > ./"$1" elif command -v curl >/dev/null 2>&1; then