10 lines
202 B
Bash
10 lines
202 B
Bash
|
#!/bin/sh
|
||
|
echo "Determining MIME type of $1:"
|
||
|
MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | tr -d '\r')
|
||
|
|
||
|
if [ "$MIME" = "text/html" ]
|
||
|
then
|
||
|
$BROWSER $1
|
||
|
else
|
||
|
handlr launch "$MIME" -- "$1"
|
||
|
fi
|