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.
12345678910111213141516 |
- #!/usr/bin/env bash
- #
- # pbrisbin 2013 - share a file by hosting it on pbrisbin dot com.
- #
- ###
- [[ "$1" =~ -p|--prefix ]] && { prefix="$2/"; shift 2; }
-
- file="$(readlink -f "$1")"
- base="${file##*/}"
- link="http://files.pbrisbin.com/$prefix$base"
-
- scp "$file" "pbrisbin.com:/srv/http/files/$prefix$base" || exit $?
-
- [[ -n "$DISPLAY" ]] && printf "$link" | xclip
-
- printf "%s\n" "$link"
|