Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- file=$(mktemp ~/web/paste/XXXXXX)
- [[ ! -z "$1" ]] && lang="-s $1"
- cat - > ${file}.in
- source-highlight -i ${file}.in -o ${file} ${lang}
- rm ${file}.in
- lftp -e "put -O /dir/to/paste ${file}; bye" \
- -u user,password sftp://example.com
- echo "http://example.com/paste/${file##*/}"
Advertisement
Add Comment
Please, Sign In to add comment