-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhsrc.sh
More file actions
executable file
·43 lines (37 loc) · 1.28 KB
/
whsrc.sh
File metadata and controls
executable file
·43 lines (37 loc) · 1.28 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
if [[ $(dirname ${0}) == $(dirname .) ]]; then
echo "Now here. Run me in the wormhole directory."
exit 0
fi
cp ~/work/c/Makefile.common .
cp ~/work/c/ctypes.h .
cp ~/work/c/lib.* .
cp ~/work/c/kv.* .
cp ~/work/c/wh.* .
# trim
sed -i \
-e '/^\/\/ simd {{{$/,/^\/\/ }}} simd$/d' \
-e '/^\/\/ bitmap {{{$/,/^\/\/ }}} bitmap$/d' \
-e '/^\/\/ bloom filter {{{$/,/^\/\/ }}} bloom filter$/d' \
-e '/^\/\/ oalloc {{{$/,/^\/\/ }}} oalloc$/d' \
-e '/^\/\/ arena {{{$/,/^\/\/ }}} arena$/d' \
-e '/^\/\/ qsort {{{$/,/^\/\/ }}} qsort$/d' \
-e '/^\/\/ xlog {{{$/,/^\/\/ }}} xlog$/d' \
-e '/^\/\/ damp {{{$/,/^\/\/ }}} damp$/d' \
-e '/^\/\/ vctr {{{$/,/^\/\/ }}} vctr$/d' \
-e '/^\/\/ rgen {{{$/,/^\/\/ }}} rgen$/d' \
-e '/^\/\/ multi-rcu {{{$/,/^\/\/ }}} multi-rcu$/d' \
-e '/^\/\/ server {{{$/,/^\/\/ }}} server$/d' \
-e '/^\/\/ forker {{{$/,/^\/\/ }}} forker$/d' \
lib.c lib.h #
sed -i \
-e '/^\/\/ miter {{{$/,/^\/\/ }}} miter$/d' \
-e '/^\/\/ tcpmap {{{$/,/^\/\/ }}} tcpmap$/d' \
-e '/^\/\/ kvload {{{$/,/^\/\/ }}} kvload$/d' \
kv.c kv.h #
sed -i \
-e '/^\/\/ debug {{{$/,/^\/\/ }}} debug$/d' \
wh.c wh.h #
# remove empty lines
sed -i '/^$/N;/^\n$/D' *.c *.h
# vim:fdm=manual