freebsd-ports/astro/boinc-astropulse/files/pkg-deinstall.in
Rene Ladan 3505219045 SETI - Search for Extra-Terrestrial Intelligence -- AstroPulse
The project listens for broad-band, short-time pulses that might represent
extraterrestial intelligence, or other phenomena such as rapidly rotating
pulsars or exploding primordial black holes.

The port automatically optimizes for the host CPU using the CPUTYPE
variable in /etc/make.conf

Currently it requires X to build, but at runtime X is only required for the
screen saver.  This requirement is an artifact of the current upstream design
of the port.

WWW: http://setiathome.berkeley.edu/

Feature safe:	yes
2011-01-23 21:13:13 +00:00

26 lines
490 B
Bash

#!/bin/sh
# $FreeBSD$
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
F=%%BOINC_HOME%%/projects/%%SETI_SITE%%/app_info.xml
echo Removing astropulse_v505 lines from $F
l=`grep -n "<name>astropulse_v505</name>" $F | cut -f 1 -d :`
if [ $? -ne 0 ]; then
echo $F is corrupt
exit 1
fi
l1=$((l-1))
l2=$((l+13))
sed -i.bak "${l1},${l2}d" $F # sed wants the braces
rm $F.bak
l=`wc -l $F | cut -f 1 -d / | sed 's/ //g'`
if [ $l -eq 2 ]; then
echo Removing empty $F
rm $F
fi