-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDIFF
executable file
·57 lines (51 loc) · 1.5 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
#! /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}/sproul"
set ROOT="/mnt/sproul"
#set ROOT="/media/${USER}/3D76-ECB1"
#set ROOT="/media/${USER}/acer"
#set ROOT="/media/${USER}/cartman"
#set ROOT="../clone"
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
# Overide if necessary
#set old="NEW"
rm -f DIFFS
set PREDICT="pypredict-1.7.0"
foreach i (*.py *.txt $PREDICT/*.c $PREDICT/*.py $PREDICT/JBA work/* DIFF *.bat trsp/Moon.trsp trsp/None.trsp)
echo $i
set n=`diff $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 pySat.py DIFF
cat DIFFS