One bug fix, one removal of an unnecessary cat.

This commit is contained in:
Simon Gomizelj 2011-11-28 21:28:02 -05:00
commit e0535cce8b

View file

@ -24,7 +24,7 @@ sprunge () {
local url syntax
if [[ -t 0 ]]; then
if [[ "$*" ]]; then
if [[ -n "$*" ]]; then
if [[ -f "$*" ]]; then
# Use python to attempt to detect the syntax
syntax=$(echo "try:
@ -32,7 +32,7 @@ sprunge () {
print(get_lexer_for_filename('$*').aliases[0])
except:
print('text')" | python)
url=$(cat "$*" | curl -F 'sprunge=<-' http://sprunge.us)
url=$(curl -F 'sprunge=<-' http://sprunge.us < "$*")
fi
else
cat << HERE