Welcome to mirror list, hosted at ThFree Co, Russian Federation.

removecomments.sh « tools « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2d8cb27023a6d8813d0ccc6847b71bdfc9721b65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# Remove comments from .sources files since this usage of IFS is unsuable inside make
#  (trouble with newlines)

source_files="$@"

OIFS=$IFS

for f in $source_files ; do
	IFS='

'
	for f in `cat $f` ; do
		case $f in
			\#*) ;;
			*) echo $f ;;
		esac
	done
	OIFS=$IFS
done

IFS=$OIFS