-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathocta-track.sh
executable file
·66 lines (50 loc) · 1.61 KB
/
octa-track.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
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
source local.cfg
TRACKED="Base/REM2023A/ Base/REDFX/"
TRACKED="$OT_PROJECT_PATH/$OT_PROJECT"
EXCLUDING="dummy"
#rsync -vnrc --exclude Base/AUDIO /run/media/stephane/OCTATRACK64/ OT/
echo "Describe changes since last sync. One line only"
read MESSAGE
#echo 5 secs to cancel \(ctrl-C\)
#sleep 5
#echo 1 secs to cancel \(ctrl-C\)
#sleep 1
for TRACKING in $TRACKED
do
echo "Tracking $TRACKING"
#rsync -vrc /run/media/stephane/OCTATRACK64/${TRACKING} --exclude ${EXCLUDING} OT/${TRACKING}
echo "git -C $DATA_REPOSITORY add $TRACKING/"
git -C $DATA_REPOSITORY add $TRACKING/
echo "processing $TRACKING ( in $DATA_REPOSITORY/$TRACKING )"
pushd OT/${TRACKING}
pwd
#ls
#git status
#ls | grep -E -o "bank[0-9]*.(work|strd)"
echo generate hexdump of files for better diffing
for f in `git status | grep -E "(modified|added)"| grep -E -o "bank[0-9]*.(work|strd)"`;
do
echo hexdump -C ${f} ${f}.hexdump
hexdump -C ${f} > ${f}.hexdump
done
for f in `git status | grep -E "(modified|added)" |grep -E -o "arr[0-9]*.(work|strd)"`;
do
echo hexdump -C ${f} ${f}.hexdump
hexdump -C ${f} > ${f}.hexdump
done
for f in `git status | grep -E "(modified|added)" | grep -E -o "(project|markers).(work|strd)"`;
do
echo hexdump -C ${f} ${f}.hexdump
hexdump -C ${f} > ${f}.hexdump
done
popd
done
echo Done processing files.
#changes to the data
#pushd OT
git -C $DATA_REPOSITORY add $TRACKING/*
echo Done adding files.
git -C $DATA_REPOSITORY commit -a -m "${MESSAGE}"
echo Done commiting
git -C $DATA_REPOSITORY status
#popd