-
Notifications
You must be signed in to change notification settings - Fork 3
/
DIFF
executable file
·62 lines (56 loc) · 1.67 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
#! /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}/3D76-ECB1"
#set ROOT="/media/${USER}/acer"
#set ROOT="/media/${USER}/cartman"
if( !(-e $ROOT) && (-e ${ROOT}2) )then
set ROOT="${ROOT}2"
else if( 0 )then
echo Trying to think but nothing happens ...
set MACHINE=`basename $ROOT`
set ROOT=`ls -d /run/user/1001/gvfs/smb-share*${MACHINE}`
endif
echo ROOT=$ROOT
#exit
# 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}
# Overide if necessary
set old="save77"
echo OLD=$old
rm -f DIFFS
foreach i (DIFF *.py SSTV FT8* *.bat *.m BUILD* *.txt README.md)
echo $i
set n=`diff -w $old/$i $i | wc -l`
if( !( -e $old/$i ) )then
echo NO SUCH FILE $old/$i --- Copying $i to $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 pySDR.py DIFF BUILD*
cat DIFFS