-
Notifications
You must be signed in to change notification settings - Fork 7
/
slv-ngbotc.sh
35 lines (30 loc) · 990 Bytes
/
slv-ngbotc.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
31
32
33
34
35
#!/bin/sh
# ngbot changes 20161216 slv
# run this before you update your sitebot so you know what changed
# set this to where you git cloned pzs-ng
SRCDIR="/jail/workspace/pzs-ng/sitebot"
# location of ngbot
SITEBOTDIR="/jail/glftpd/sitebot/pzs-ng"
RESET='\033[0m'
WHITEB='\033[97;1m'
WHITEBU='\033[97;1;4m'
func_colordiff() {
diff -s -u0 $1 $2 | sed 's/^-/\x1b[31m-/;s/^+/\x1b[32m+/;s/^@/\x1b[34m@/;s/$/\x1b[0m/'
}
cd "$SRCDIR" && (
printf "${WHITEBU}* git log...${RESET}\n"
git --no-pager whatchanged @{1}.. --color
echo
printf "${WHITEBU}* diff files in $SRCDIR and $SITEBOTDIR...${RESET}\n"
printf "${WHITEB}ngBot.tcl:${RESET}\n"
func_colordiff $SITEBOTDIR/ngBot.tcl $SRCDIR/ngBot.tcl
echo
for i in modules plugins themes; do
printf "${WHITEBU}* diff files in \"$i\" dir...${RESET}\n"
cd $i && ( for j in *; do
printf "${WHITEB}$j:${RESET}\n"
func_colordiff $SITEBOTDIR/$i/$j $SRCDIR/$i/$j
echo
done ) && cd ..
done
) | less -R -X