File: remake.sh

package info (click to toggle)
gap 4r4p12-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 29,584 kB
  • ctags: 7,113
  • sloc: ansic: 98,786; sh: 3,299; perl: 2,263; makefile: 498; asm: 63; awk: 6
file content (31 lines) | stat: -rwxr-xr-x 571 bytes parent folder | download | duplicates (4)
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
31
#! /bin/sh 
input0=/tmp/gapinput0.$$
input=/tmp/gapinput.$$
logfile=/tmp/gaplog.$$
prelogfile=/tmp/gapprelog.$$
sedscript=/tmp/sedfile.$$
cat > $sedscript <<EOF
/^#/ p
/^$/ p
/^ \+$/ p
/^\(gap\)\?> /  !d
s/^\(gap\)\?> //
EOF
sed  -f $sedscript < $1 > $input0
cat - $input0 > $input <<EOF
LogTo("$prelogfile");
EOF
cat $input - > $input0 <<EOF
LogTo();
quit;
EOF
gap4 -N -A -x 80 < $input0 > /dev/null
cat > $sedscript <<EOF
s/^gap> #/#/
s/^gap> \+$//
/^\$Id: / d
/^GAP4stones: / d
/^gap> LogTo();/ d
EOF
sed -f $sedscript < $prelogfile > $logfile
echo result in $logfile