forked from DarkstarProject/darkstar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gensources.sh
30 lines (21 loc) · 1.2 KB
/
gensources.sh
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
#!/bin/bash
for line in `grep -e "Cl.*Include=\"\." win32/DSGame-server/*proj | tr -d " \"\" \"\/\>\r" | cut -c25- | sed 's:\\\:\/:g' `; do echo -n "${line} \\"; echo; done > game.sources
echo SRC_COMMON = \\ > sources.am
cat game.sources | grep src/common/ | sed '$s/.$//' >> sources.am
echo "" >> sources.am
echo SRC_MAP = \\ >> sources.am
cat game.sources | grep src/map/ | sed '$s/.$//' >> sources.am
echo "" >> sources.am
for line in `grep -e "Cl.*Include=\"\." win32/DSConnect-server/*proj | tr -d " \"\/\>\r" | cut -c25- | sed 's:\\\:\/:g' `; do echo -n "${line} \\"; echo; done > connect.sources
echo SRC_LOGIN = \\ >> sources.am
cat connect.sources | grep src/login/ | sed '$s/.$//' >> sources.am
echo "" >> sources.am
for line in `grep -e "Cl.*Include=\"\." win32/DSSearch-server/*proj | tr -d " \"\/\>\r" | cut -c25- | sed 's:\\\:\/:g' `; do echo -n "${line} \\"; echo; done > search.sources
echo SRC_SEARCH_COMMON = \\ >> sources.am
cat search.sources | grep src/common/ | sed '$s/.$//' >> sources.am
echo "" >> sources.am
echo SRC_SEARCH = \\ >> sources.am
cat search.sources | grep src/search/ | sed '$s/.$//' >> sources.am
echo "" >> sources.am
echo "SRC_DARKSTAR = \$(SRC_COMMON)" >> sources.am
rm *.sources