-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDIFF
executable file
·91 lines (84 loc) · 2.24 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#! /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="/media/${USER}/sproul-win"
#set ROOT="/mnt/sproul"
#set ROOT="/media/${USER}/3D76-ECB1"
#set ROOT="/media/${USER}/acer"
#set ROOT="../clone"
#set ROOT="/media/${USER}/cartman"
if( !(-e $ROOT) )then
echo " "
echo $ROOT doesnt appear to be mounted - trying alternative ...
set ROOT="${ROOT}2"
endif
if( !(-e $ROOT) )then
echo $ROOT doesnt appear to be mounted - giving up :-\(
echo " "
#exit
endif
#if( !(-e $ROOT) && (-e ${ROOT}2) )then
# set ROOT="${ROOT}2"
#else
# set ROOT="${ROOT}3"
#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}
#exit
# Overide if necessary
#set old="work"
#set old="save89"
# Make sure remote dir is mounted
echo " "
echo $old
echo "Check mount for $old ..."
set a=`ls $old`
echo a=$#a
if( $#a < 2 )then
echo $old doesnt appear to be mounted :-\(
exit
endif
#echo This part of the script is new so remove the exit if all is ok
#exit
rm -f DIFFS
echo OLD=$old
foreach i (*.py AA2IL.adif sats.adif start* DIFF *.txt *.bat *.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 --- 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 pyKeyer.py DIFF start *
#cat DIFFS
set f=`basename $ROOT`
echo $f
if( $f == "acer" )then
ls $old/dist
cp $old/dist/*.exe $old/dist/Output/*.exe dist
endif