added config file and support for browser
This commit is contained in:
parent
24a07a5e02
commit
aa8cecba5a
@ -1,7 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "Determining MIME type of $1:"
|
echo "Determining MIME type of $1:"
|
||||||
|
|
||||||
MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | tr -d '\r')
|
MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | tr -d '\r')
|
||||||
|
|
||||||
|
echo $MIME
|
||||||
|
|
||||||
|
BROWSER=$(cat /etc/xdg-sanity.conf | sed -n -e 's/^browser = //p')
|
||||||
|
|
||||||
if [ "$MIME" = "text/html" ]
|
if [ "$MIME" = "text/html" ]
|
||||||
then
|
then
|
||||||
$BROWSER $1
|
$BROWSER $1
|
||||||
|
Loading…
Reference in New Issue
Block a user