55
66# Start time of script generation
77start=$( date +%s.%N)
8- MY_GIT_TAG=v1.0 .$TRAVIS_BUILD_NUMBER
8+ MY_GIT_TAG=v2.2017.07 .$TRAVIS_BUILD_NUMBER
99
1010# Temporary database files we create
1111_inputdbA=/tmp/lastupdated.db
@@ -17,29 +17,31 @@ _tmpnginxA=tmpnginxA
1717_tmpnginxB=tmpnginxB
1818
1919# Start and End Strings to Search for to do inserts into template
20- _startdate =" ### Last Updated "
21- _enddate =" ### End Last Updated "
22- _startgen=" ### Generated in"
23- _endgen=" ### End Generated in"
20+ _startmarker =" ### Version Information "
21+ _endmarker =" ### Version Information END "
22+ # _startgen="### Generated in"
23+ # _endgen="### End Generated in"
2424
25- # PRINT DATE AND TIME OF LAST UPDATE
25+ # PRINT VERSION INFORMATION
2626# **********************************
2727LASTUPDATEIFS=$IFS
2828IFS=$' \n '
2929now=" $( date) "
30- echo $_startdate >> $_tmpnginxA
31- printf " ### Updated: " $now " \n### Build: " $MY_GIT_TAG " \n" >> $_tmpnginxA
32- echo $_enddate >> $_tmpnginxA
30+ end=$( date +%s.%N)
31+ echo $_startmarker >> $_tmpnginxA
32+ runtime=$( python -c " print(${end} - ${start} )" )
33+ printf " ### Version: " $MY_GIT_TAG " \n### Updated: " $now " \n### Generated In: " $runtime " seconds\n" >> $_tmpnginxA
34+ echo $_endmarker >> $_tmpnginxA
3335IFS=$LASTUPDATEIFS
3436mv $_tmpnginxA $_inputdbA
3537ed -s $_inputdbA << \IN
36- 1,/### Last Updated /d
37- /### End Last Updated /,$d
38+ 1,/### Version Information /d
39+ /### Version Information END /,$d
3840,d
3941.r /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
40- /### Last Updated /x
42+ /### Version Information /x
4143.t.
42- .,/### End Last Updated /-d
44+ .,/### Version Information END /-d
4345#,p
4446#,p used to print output replaced with w below to write
4547w /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
@@ -49,26 +51,26 @@ rm $_inputdbA
4951
5052# End time of script generation
5153# *****************************
52- GENTIME=$IFS
53- IFS=$' \n '
54- end=$( date +%s.%N)
55- runtime=$( python -c " print(${end} - ${start} )" )
56- echo $_startgen >> $_tmpnginxB
57- printf " ### " $runtime " seconds\n" >> $_tmpnginxB
58- echo $_endgen >> $_tmpnginxB
59- IFS=$GENTIME
60- mv $_tmpnginxB $_inputdbB
61- ed -s $_inputdbB << \IN
62- 1,/### Generated in/d
63- /### End Generated in/,$d
64- ,d
65- .r /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
66- /### Generated in/x
67- .t.
68- .,/### End Generated in/-d
69- w /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
70- q
71- IN
72- rm $_inputdbB
54+ # GENTIME=$IFS
55+ # IFS=$'\n'
56+ # end=$(date +%s.%N)
57+ # runtime=$(python -c "print(${end} - ${start})")
58+ # echo $_startgen >> $_tmpnginxB
59+ # printf "### "$runtime" seconds\n" >> $_tmpnginxB
60+ # echo $_endgen >> $_tmpnginxB
61+ # IFS=$GENTIME
62+ # mv $_tmpnginxB $_inputdbB
63+ # ed -s $_inputdbB<<\IN
64+ # 1,/### Generated in/d
65+ # /### End Generated in/,$d
66+ # ,d
67+ # .r /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
68+ # /### Generated in/x
69+ # .t.
70+ # .,/### End Generated in/-d
71+ # w /home/travis/build/mitchellkrogza/Travis-CI-Nginx-for-Testing-Nginx-Configuration/globalblacklist.conf
72+ # q
73+ # IN
74+ # rm $_inputdbB
7375
7476exit 0
0 commit comments