This file is indexed.

postinst is in bladerf-fpga-hostedx115 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/hostedx115.rbf'
CHECKSUM='8af6607afdcf9b00ddae8fbd2cf2eafa'
RBFFILE=/usr/share/Nuand/bladeRF/hostedx115.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-hostedx115"
		again when networking is up, or copy the firmware manually
		to $RBFFILE

	EOMSG
fi