12345678910111213141516171819202122 |
- #!/bin/bash
-
- OS=$(uname)
-
- if [ "$1" == "" ] || [ "$2" == "" ]; then
- echo "mupload <file> <name>"
- exit 1
- elif [ ! -f "$1" ]; then
- echo "File $1 doesn't exist."
- exit 1
- fi
-
- URL="http://d.mort.coffee/$2"
-
- echo "$URL" | mclip
-
- scp "$1" "martin@serve.mort.coffee:/var/www/mort.coffee/d/public/content/$2"
- if [ $? -eq 0 ]; then
- echo "$URL"
- else
- exit 1
- fi
|