-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathesniper-git.sh
More file actions
executable file
·38 lines (29 loc) · 922 Bytes
/
Copy pathesniper-git.sh
File metadata and controls
executable file
·38 lines (29 loc) · 922 Bytes
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
#!/bin/bash
##set -x
dir=$(dirname $0)/.esniper
if [ ! -d $dir ]; then
echo -e ':::\n::: clone ...\n:::'
# Clone esniper
git clone https://git.code.sf.net/p/esniper/git $dir
cd $dir
else
echo -e ':::\n::: pull ...\n:::'
cd $dir
# Reset patched files
git checkout -- .
# Pull changes
git pull origin master
fi
# Patch min. bid time to 1 sec. and default bid time to 7 sec.
sed -i 's/#define MIN_BIDTIME.*$/#define MIN_BIDTIME 1/;
s/#define DEFAULT_BIDTIME.*$/#define DEFAULT_BIDTIME 7/' esniper.c
echo -e ':::\n::: configure, make, strip ...\n:::'
autoreconf -i && ./configure && make
[ $? == 0 ] || exit
echo -e ':::\n::: "make install" will require root privileges via sudo!\n:::'
strip esniper && sudo make install && make clean
if [ $? == 0 ]; then
echo '----------------------------------------------------------------------------'
esniper -v
fi
set +x