forked from nico/dots
zsh: allow uploading directories via 0x0 function
This commit is contained in:
parent
35c77911a3
commit
bca296334f
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue