Simple image host.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mupload 354B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. OS=$(uname)
  3. if [ "$1" == "" ] || [ "$2" == "" ]; then
  4. echo "mupload <file> <name>"
  5. exit 1
  6. elif [ ! -f "$1" ]; then
  7. echo "File $1 doesn't exist."
  8. exit 1
  9. fi
  10. URL="http://d.mort.coffee/$2"
  11. echo "$URL" | mclip
  12. scp "$1" "martin@serve.mort.coffee:/var/www/mort.coffee/d/public/content/$2"
  13. if [ $? -eq 0 ]; then
  14. echo "$URL"
  15. else
  16. exit 1
  17. fi