2015-11-11 15:18:51 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-08-29 17:27:48 +02:00
|
|
|
wrap_in_html_if_url()
|
|
|
|
{
|
|
|
|
case "$1" in
|
|
|
|
*://*)
|
|
|
|
FILE_ARGUMENT=$(mktemp)
|
2015-10-15 04:34:55 +02:00
|
|
|
|
2011-08-29 17:27:48 +02:00
|
|
|
echo -n '<html><meta HTTP-EQUIV="REFRESH" content="0; url=' > $FILE_ARGUMENT
|
|
|
|
echo -n "$1" >> $FILE_ARGUMENT
|
|
|
|
echo '"></html>' >> $FILE_ARGUMENT
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
FILE_ARGUMENT="$1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
2015-10-15 04:34:55 +02:00
|
|
|
|