File: fetch-openline-firmware

package info (click to toggle)
vpb-driver 4.2.58-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,512 kB
  • ctags: 5,836
  • sloc: cpp: 26,247; ansic: 18,763; sh: 3,298; perl: 1,132; makefile: 752; asm: 182
file content (30 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh

set -e

FIRMWARE="vpbmain_pci.out"
FIRMWARE_DIR="/usr/share/vpb-driver"
FIRMWARE_URL="http://www.voicetronix.com.au/Downloads/firmware/$FIRMWARE"

WGET="$(which wget)"

if [ -z "$WGET" ]; then
    echo
    echo "  You will need to install wget to run $0"
    echo "  Alternative you may just manually fetch:"
    echo "  $FIRMWARE_URL"
    echo "  and install it to: $FIRMWARE_DIR/$FIRMWARE"
    echo
    exit 1
fi
if [ $(id -u) != "0" ]; then
    echo
    echo " You must be root to run $0"
    echo
    exit 1
fi

mkdir -p "$FIRMWARE_DIR"

( cd "$FIRMWARE_DIR" && $WGET -nc "$FIRMWARE_URL" )