Browse Source

Start seconds counter at start of function

Bob Mottram 7 years ago
parent
commit
af4755f2da
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/freedombone-app-tox

+ 1
- 1
src/freedombone-app-tox View File

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