-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
54 lines (42 loc) · 1.42 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
# Copyright (C) 2011 by Kevin Nam Truong, Daniel Steinberg, Debasish Das, Juan Pineda, Melissa Miranda, and Victoria Pan
.SILENT:
help:
echo "make N -- show number of queries in log"
echo "make Nunique -- show number of unique queries in log"
echo "make queries -- list (unique) queries"
echo "make pg -- show number if queries for user pg"
echo "make log -- real time log display"
echo "make flush -- flush cache"
echo "make clean -- clean up temporary files"
echo "make setup -- setup new installation"
echo "make start -- start or restart apache server"
echo "make update -- update server from GitHub"
echo "make push -- push local changes to GitHub"
N :
cat /tmp/StalkerBot.log | grep Stalking\: | colrm 1 39 | wc -l
Nunique :
cat /tmp/StalkerBot.log | grep Stalking\: | colrm 1 39 | sort | uniq | wc -l
queries :
cat /tmp/StalkerBot.log | grep Stalking\: | colrm 1 39 | sort | uniq
pg :
cat /tmp/StalkerBot.log | grep Stalking\: | colrm 1 39 | grep pg | wc -l
log :
tail -n 100 -f /tmp/StalkerBot.log
flush :
rm -r /var/tmp/stalkerbot-cache
clean :
rm -f *~
rm -f */*~
rm -f */*.pyc
setup :
mkdir -p options-and-settings/api-keys/
echo "make sure to copy key files to options-and-settings/api-keys/"
start :
/etc/init.d/apache2 restart
update :
cd /srv/www/htdocs/StalkerBot/
pwd
git pull --rebase
push :
echo "To push changes to Github use:"
echo " git push; git push --tags"