Simple image host.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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