diff --git a/stow/.zshrc b/stow/.zshrc index 2572151..a468ff6 100644 --- a/stow/.zshrc +++ b/stow/.zshrc @@ -47,7 +47,14 @@ func calc() { } func 0x0() { - curl -F file=@$1 https://0x0.st + if [ -d "$1" ]; + then + TMPFILE="$(mktemp)" + tar cf "$TMPFILE" "$1" + curl -F file=@$TMPFILE -F expires=24 https://0x0.st + else + curl -F file=@$1 -F expires=24 https://0x0.st + fi } # plugins