-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload
executable file
·60 lines (46 loc) · 1005 Bytes
/
upload
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
#!/bin/sh
GIT=git
TODAY="$(date +%Y-%m-%d)"
while getopts "fn" opt ; do
case $opt in
f) FLDIGI="fldigi" ;;
n) GIT="" ;;
*) exit 5 ;;
esac
done
# shift away args
shift $((OPTIND - 1))
set -eu
git pull --ff-only
mkdir -p lotw/tmp
( set -x
cd wsjtx
./import
cd ../js8
./import
if [ ${FLDIGI:-} ]; then
cd ../fldigi
../bin/import-adif logbook.adif
fi
cd ../lotw
STAMP=$(cat .upload.stamp || echo 'today')
../bin/export-adif -s $STAMP tmp/upload.adif
./lotw-upload $STAMP
./clublog-upload $STAMP
./rrdxa-post tmp/upload.adif
./dcl-upload tmp/upload.adif
../bin/export-adif -s $STAMP -m DF7CB tmp/DF7CB.adif
./eqsl-upload tmp/DF7CB.adif
../bin/export-adif -s $STAMP -v QO100 tmp/df7cb-qo100.adif
grep -q '<eor>' tmp/df7cb-qo100.adif && ./qo100-upload tmp/df7cb-qo100.adif
echo "$TODAY" > .upload.stamp
./lotw_download
./dcl-download
cd ../dump
./dump
)
if [ "$GIT" ]; then
git add -u
git commit -m "Log upload"
git push
fi