postinst is in bladerf-fpga-hostedx40 0.2016.01~rc1-3.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
set -e
UPSTREAM='https://www.nuand.com/fpga/v0.5.0/hostedx40.rbf'
CHECKSUM='af8ea27b4f545113db3d9b6d986f6525'
RBFFILE=/usr/share/Nuand/bladeRF/hostedx40.rbf
checkfile () {
md5sum --check <<- EOMD5SUM
$CHECKSUM $RBFFILE
EOMD5SUM
}
# Fetch firmware if needed
if [ ! -s $RBFFILE ] || ! checkfile ; then
echo "Downloading FPGA bitstream from nuand.com..."
rm -f $RBFFILE
wget -O $RBFFILE $UPSTREAM || cat <<- EOMSG 1>&2
Warning: Failed to download FPGA bitstream for bladeRF.
Please run "dpkg-reconfigure bladerf-fpga-hostedx40"
again when networking is up, or copy the firmware manually
to $RBFFILE
EOMSG
fi
|