feat(bkgpslog): Append to daily tar
[EVA-2020-02.git] / exec / bkgpslog-plan.org
... / ...
CommitLineData
1* bkgpslog narrative
2** Initialize environment
3*** Init variables
4**** Save timeStart (YYYYmmddTHHMMSS±zz)
5*** Define Functions
6**** Define Debugging functions
7**** Define Argument Processing function
8**** Define Main function
9** Run Main Function
10*** Process Arguments
11*** Set output encryption and compression option strings
12*** Check that critical apps and dirs are available, displag missing ones.
13*** Set lifespans of script and buffer
14*** Init temp working dir ~DIR_TMP~
15Make temporary dir in tmpfs dir: ~/dev/shm/$(nonce)..bkgpslog/~ (~DIR_TMP~)
16*** Initialize ~tar~ archive
17**** Write ~bkgpslog~ version to ~$DIR_TMP/VERSION~
18**** Create empty ~tar~ archive in ~DIR_OUT~ at ~PATHOUT_TAR~
19
20Set output file name to:
21: PATHOUT_TAR="$DIR_OUT/YYYYmmdd..hostname_location.gz.age.tar"
22Usage: ~iso8601Period $timeStart $timeEnd~
23
24**** Append ~VERSION~ file to ~PATHOUT_TAR~
25
26Append ~$DIR_TMP/VERSION~ to ~PATHOUT_TAR~ via ~tar --append~
27
28*** Read/Write Loop (Record gps data until script lifespan ends)
29**** Determine output file paths
30**** Define GPS conversion commands
31**** Fill Bash variable buffer from ~gpspipe~
32**** Process bufferBash, save secured chunk set to ~DIR_TMP~
33**** Append each secured chunk to ~PATHOUT_TAR~
34: tar --append --directory=DIR_TMP --file=PATHOUT_TAR $(basename PATHOUT_{NMEA,GPX,KML} )
35**** Remove secured chunk from ~DIR_TMP~