File: c2tex

package info (click to toggle)
lgrind 3.67-3.1
  • links: PTS
  • area: non-free
  • in suites: buster, stretch
  • size: 360 kB
  • ctags: 218
  • sloc: ansic: 2,261; makefile: 125; asm: 75; sh: 39
file content (17 lines) | stat: -rwxr-xr-x 347 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# convert .c to .lg 

if [ -n "$1" ] && [ -f $1 -o -f $1.c ]
then
    if [ `basename $1` = `basename $1 .c` ]
    then
	lgrind -i -v subst $1.c > $1.lg
	echo Created $1.lg
    else
	lgrind -i -v subst $1 > `basename $1 .c`.lg
	echo Created `basename $1 .c`.lg
    fi
else
    echo Usage: $0 "<file>[.c]"
    echo $1.c does not exist.
fi