File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ SECONDS=0
3+ # ---------------------------------------------------
4+ YEAR=` date ' +%Y' `
5+ MONTH=` date ' +%m' `
6+ DAY=` date ' +%d' `
7+ # ---------------------------------------------------
8+ # source the configuration file
9+ # it must be edited and copied as ".BirdNET-BarChart" to you home directory
10+ CONFIG_FILE=${HOME} /.BirdNET-BarChart
11+ if [ -f " ${CONFIG_FILE} " ]; then
12+ source ${CONFIG_FILE}
13+ else
14+ echo " "
15+ echo " ${CONFIG_FILE} does not exist."
16+ echo " Run the config.sh script to create."
17+ echo " "
18+ exit 1
19+ fi
20+ # ---------------------------------------------------
21+ {
22+ # check for semaphore
23+ if [ -f " ${BARCHART_HOME} /util/updates/update-2.8-tasks.lock" ]; then
24+ echo " previously run"
25+ else
26+ touch " ${BARCHART_HOME} /util/updates/update-2.8-tasks.lock"
27+ echo " no action necessary"
28+ fi
29+ # cascade the update to previous tasks
30+ ${BARCHART_HOME} /util/updates/update-2.8-tasks.sh
31+ # how long did it take
32+ DURATION=$SECONDS
33+ echo " $(( $DURATION / 60 )) minutes and $(( $DURATION % 60 )) seconds elapsed."
34+ } >> ${BARCHART_HOME} /logs/${YEAR} -${MONTH} -${DAY} -update-2.8-tasks.out 2>> ${BARCHART_HOME} /logs/${YEAR} -${MONTH} -${DAY} -update-2.8-tasks.err
35+ # ---------------------------------------------------
You can’t perform that action at this time.
0 commit comments