-
Notifications
You must be signed in to change notification settings - Fork 0
/
DIFF
executable file
·63 lines (57 loc) · 1.6 KB
/
DIFF
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
55
56
57
58
59
60
61
62
63
#! /bin/csh -f
#############################################################################
#
# Script to compare working code version on RPi to configured version
#
#############################################################################
#
# Specify root where old version exists
#set ROOT="/media/${USER}/305f60b3-8413-4edb-afc1-4e4ce064aab3/home/${USER}"
#set ROOT="/media/${USER}/pi"
#set ROOT="/media/${USER}/aa2il"
set ROOT="/media/${USER}/marconi"
#set ROOT="/media/${USER}/hertz"
set ROOT="/media/${USER}/sproul"
#set ROOT="/mnt/sproul"
set ROOT="/media/${USER}/sproul-win"
#set ROOT="/media/${USER}/3D76-ECB1"
#set ROOT="/media/${USER}/acer"
#set ROOT="/media/${USER}/cartman"
if( !(-e $ROOT) )then
set ROOT="${ROOT}2"
endif
# Add path down to old version
set N=`echo $HOME | wc -c`
echo N=$N
#set PTH=`pwd | cut -c ${N}-`
set PTH=`pwd | sed 's/\/home2//g' | cut -c ${N}-`
echo PTH=$PTH
set old=${ROOT}${PTH}
echo OLD=$old
# Override if needed
#set old='save45'
rm -f DIFFS
foreach i (*.py DIFF *.bat *.txt *.md dist/*.iss)
echo $i
set n=`diff -w $old/$i $i | wc -l`
if( !( -e $old/$i ) )then
echo NO SUCH FILE $old/$i
cp $i $old/$i
else if( $n > 0 ) then
echo ---------------------------------- >> DIFFS
echo $i >> DIFFS
echo " " >> DIFFS
diff -w $old/$i $i >> DIFFS
echo " " >> DIFFS
#kompare $old/$i $i
kompare $i $old/$i
endif
end
chmod +x wclock*.py DIFF
#cat DIFFS
set f=`basename $ROOT`
echo $f
if( $f == "acer" )then
ls $old/dist
cp $old/dist/*.exe $old/dist/*.iss $old/dist/Output/*.exe dist
endif