Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- URL="https://i.mjh.nz/au/Melbourne/epg.xml.gz"
- DESCRIPTION="tv_grab (MattHuisman.nz)"
- VERSION="1.3"
- if [ $# -lt 1 ]; then
- >&2 echo "Downloading $URL..."
- (
- curl -sL "$URL" || wget -qO - "$URL" || >&2 echo "ERROR: Failed to fetch data"
- ) | gunzip
- exit 0
- fi
- dflag=
- vflag=
- cflag=
- for a in "$@"; do
- [ "$a" = "-d" -o "$a" = "--description" ] && dflag=1
- [ "$a" = "-v" -o "$a" = "--version" ] && vflag=1
- [ "$a" = "-c" -o "$a" = "--capabilities" ] && cflag=1
- done
- if [ -n "$dflag" ]; then
- echo $DESCRIPTION
- fi
- if [ -n "$vflag" ]; then
- echo $VERSION
- fi
- if [ -n "$cflag" ]; then
- echo "baseline"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement