17 lines
292 B
Bash
Executable file
17 lines
292 B
Bash
Executable file
#!/bin/sh
|
|
NULL_PTR="https://0x0.st"
|
|
|
|
LOC="$1"
|
|
FILE="$LOC"
|
|
[ -d "$FILE" ] &&
|
|
FILE="${FILE%/}.zip" &&
|
|
zip -r "$FILE" "$LOC"
|
|
|
|
curl -F "file=@$FILE" "$NULL_PTR"
|
|
|
|
[ -d "${FILE%.zip}" ] &&
|
|
printf 'Remove created %s? [y/n]: ' "$FILE" && read p
|
|
|
|
[ "$p" = "y" ] && rm -rf "$FILE"
|
|
|
|
exit 0
|