|
@@ -32,6 +32,26 @@ die() {
|
32
|
32
|
exit 9
|
33
|
33
|
}
|
34
|
34
|
|
|
35
|
+build() {
|
|
36
|
+ ffoom init_path >& /dev/null \
|
|
37
|
+ || die "-----" \
|
|
38
|
+ "fastfoo not installed or ffoom is not available for $(id -un)." \
|
|
39
|
+ "In the latter case try running (only) \`make\` under normal" \
|
|
40
|
+ "user and repeating the \`make install\` again." \
|
|
41
|
+ "-----"
|
|
42
|
+ local ffoo_init=$(ffoom init_path)
|
|
43
|
+ local srcpath dstpath
|
|
44
|
+ find -type f -name '*.in' \
|
|
45
|
+ | while read srcpath;
|
|
46
|
+ do
|
|
47
|
+ dstpath=${srcpath%.in}
|
|
48
|
+ perl -pe "s|__FFOO_INIT__|$ffoo_init|;
|
|
49
|
+ s|__FFOO_INI_PATH__|$FFOO_INI_PATH_GLOBAL:\\\$HOME/$FFOO_INI_PATH_USER|;
|
|
50
|
+ s|__VERSION__|$VERSION|;" < $srcpath > $dstpath
|
|
51
|
+ echo $dstpath >> built.list
|
|
52
|
+ done
|
|
53
|
+}
|
|
54
|
+
|
35
|
55
|
clean() {
|
36
|
56
|
test -f built.list && {
|
37
|
57
|
cat built.list | xargs rm -f
|
|
@@ -64,26 +84,6 @@ install() {
|
64
|
84
|
test -f .autoclean && clean || :
|
65
|
85
|
}
|
66
|
86
|
|
67
|
|
-eecc() {
|
68
|
|
- ffoom init_path >& /dev/null \
|
69
|
|
- || die "-----" \
|
70
|
|
- "fastfoo not installed or ffoom is not available for $(id -un)." \
|
71
|
|
- "In the latter case try running (only) \`make\` under normal" \
|
72
|
|
- "user and repeating the \`make install\` again." \
|
73
|
|
- "-----"
|
74
|
|
- local ffoo_init=$(ffoom init_path)
|
75
|
|
- local srcpath dstpath
|
76
|
|
- find -type f -name '*.in' \
|
77
|
|
- | while read srcpath;
|
78
|
|
- do
|
79
|
|
- dstpath=${srcpath%.in}
|
80
|
|
- perl -pe "s|__FFOO_INIT__|$ffoo_init|;
|
81
|
|
- s|__FFOO_INI_PATH__|$FFOO_INI_PATH_GLOBAL:\\\$HOME/$FFOO_INI_PATH_USER|;
|
82
|
|
- s|__VERSION__|$VERSION|;" < $srcpath > $dstpath
|
83
|
|
- echo $dstpath >> built.list
|
84
|
|
- done
|
85
|
|
-}
|
86
|
|
-
|
87
|
87
|
run_test() {
|
88
|
88
|
pushd test
|
89
|
89
|
find -maxdepth 1 -type f \! -name '*.in' | while read test;
|
|
@@ -99,12 +99,12 @@ uninstall() {
|
99
|
99
|
}
|
100
|
100
|
|
101
|
101
|
case $1 in
|
102
|
|
- clean|dist|install|install_manpages|manpages|eecc|uninstall)
|
|
102
|
+ build|clean|dist|install|install_manpages|manpages|uninstall)
|
103
|
103
|
$1
|
104
|
104
|
;;
|
105
|
105
|
test)
|
106
|
106
|
run_test
|
107
|
107
|
;;
|
108
|
108
|
*)
|
109
|
|
- echo "usage: $(basename $0) clean|dist|install|eecc|test|uninstall" >&2
|
|
109
|
+ echo "usage: $(basename $0) build|clean|dist|install|test|uninstall" >&2
|
110
|
110
|
esac
|