File: 2pldoc

package info (click to toggle)
swi-prolog 5.10.1-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 76,436 kB
  • ctags: 45,143
  • sloc: ansic: 290,417; perl: 215,108; sh: 5,411; java: 5,136; makefile: 5,021; cpp: 2,168; yacc: 843; xml: 77; sed: 12
file content (19 lines) | stat: -rwxr-xr-x 320 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -f

if [ "$1" = "-undo" ]; then
  shift
  for f in $*; do
    echo -n "Restoring $f ..."
    p=`basename $f .bak`
    mv $f $p
    echo "ok"
  done
  exit
fi

for f in $*; do
   echo -n "Processing $f ..."
   cp -p $f $f.bak
   sed --regexp-extended -e 's/^%(\s+\w+\(.*\))/%%\1/' $f.bak > $f
   echo "ok"
done