UPDATE README Updater [MASTER]

This commit is contained in:
Mitchell Krog 2019-06-28 15:10:54 +02:00
parent 4455ccd742
commit 1975276dcd
No known key found for this signature in database
GPG key ID: C243C388553EDE5D

View file

@ -16,21 +16,22 @@
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -38,31 +39,41 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ******************
# Set Some Variables
# ******************
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# Variables
# ---------
YEAR=$(date +%Y)
MONTH=$(date +%m)
MY_GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
BAD_REFERRERS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list)
BAD_BOTS=$(wc -l < ${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list)
# **********************************
# Temporary database files we create
# **********************************
_inputdbA=/tmp/lastupdated.db
_tmpnginxA=tmpnginxA
# ***************************************************************
# Start and End Strings to Search for to do inserts into template
# ***************************************************************
_startmarker="_______________"
_endmarker="____________________"
# ---------
# FUNCTIONS
# ---------
updateReadme () {
# ****************************************
# PRINT VERSION INFORMATION INTO README.md
# ****************************************
@ -83,7 +94,9 @@ w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/README.md
q
IN
rm ${_inputdbA}
}
updateAutoConfiguration () {
# ****************************************************
# PRINT VERSION INFORMATION INTO AUTO-CONFIGURATION.md
# ****************************************************
@ -104,7 +117,9 @@ w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/AUTO-CONFIGUR
q
IN
rm ${_inputdbA}
}
updateManualConfiguration () {
# ******************************************************
# PRINT VERSION INFORMATION INTO MANUAL-CONFIGURATION.md
# ******************************************************
@ -125,7 +140,9 @@ w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/MANUAL-CONFIG
q
IN
rm ${_inputdbA}
}
updateGoogleGhostSpam () {
# *******************************************************
# PRINT VERSION INFORMATION INTO Google Ghost Spam README
# *******************************************************
@ -146,31 +163,44 @@ w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/_google_analy
q
IN
rm ${_inputdbA}
}
# -----------------
# Trigger Functions
# -----------------
# **********************
updateReadme
updateAutoConfiguration
updateManualConfiguration
updateGoogleGhostSpam
echo "${bold}${green}------------------------"
echo "${bold}${green}All README Files Updated"
echo "${bold}${green}------------------------"
printf "\n\n"
# ----------------------
# Exit With Error Number
# **********************
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -178,3 +208,4 @@ exit ${?}
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------