Simple image host.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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