Start seconds counter at start of function

This commit is contained in:
Bob Mottram 2018-04-20 15:20:32 +01:00
parent 47b848e0f1
commit af4755f2da
1 changed files with 1 additions and 1 deletions

View File

@ -426,6 +426,7 @@ function install_tox_client {
} }
function mesh_tox_node { function mesh_tox_node {
SECONDS=0
# obtain commits from the main file # obtain commits from the main file
TOXCORE_COMMIT_MAIN=$(grep "TOXCORE_COMMIT=" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox" | head -n 1 | awk -F "'" '{print $2}') TOXCORE_COMMIT_MAIN=$(grep "TOXCORE_COMMIT=" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox" | head -n 1 | awk -F "'" '{print $2}')
if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then
@ -533,7 +534,6 @@ EOF
systemctl enable tox-bootstrapd.service systemctl enable tox-bootstrapd.service
fi fi
SECONDS=0
if [ ! -f "$rootdir/usr/local/bin/tox-bootstrapd" ]; then if [ ! -f "$rootdir/usr/local/bin/tox-bootstrapd" ]; then
duration=$SECONDS duration=$SECONDS
echo $"Toxcore compile failed at $((duration / 60)) minutes and $((duration % 60)) seconds elapsed." echo $"Toxcore compile failed at $((duration / 60)) minutes and $((duration % 60)) seconds elapsed."