diff --git a/.dev-tools/deploy-package.sh b/.dev-tools/deploy-package.sh index 81c577a5d..3a3f10e97 100755 --- a/.dev-tools/deploy-package.sh +++ b/.dev-tools/deploy-package.sh @@ -50,20 +50,20 @@ MONTH=$(date +"%m") # Make Sure we are in the Build Directory # *************************************** -cd $TRAVIS_BUILD_DIR +cd ${TRAVIS_BUILD_DIR} sudo git remote -v # ************************* # Create our Version Number # ************************* -export GIT_TAG=V3.$YEAR.$MONTH.$TRAVIS_BUILD_NUMBER +export GIT_TAG=V3.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER} # *************** # Tag our release # *************** -git tag $GIT_TAG -a -m "V3.$YEAR.$MONTH.$TRAVIS_BUILD_NUMBER" +git tag ${GIT_TAG} -a -m "V3.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}" # ***************************************** # Push our commit and tags back to the repo diff --git a/.dev-tools/generate-blacklist.sh b/.dev-tools/generate-blacklist.sh index 0154c6130..b8d1285a4 100755 --- a/.dev-tools/generate-blacklist.sh +++ b/.dev-tools/generate-blacklist.sh @@ -91,7 +91,7 @@ _inputdb11=/tmp/bad-ip-addresses.db # Declare temporary variables used during generation # ************************************************** -_nginx=$TRAVIS_BUILD_DIR/.dev-tools/globalblacklist.template +_nginx=${TRAVIS_BUILD_DIR}/.dev-tools/globalblacklist.template _tmpnginxA=_tmpnginxA _tmpnginx1=_tmpnginx1 _tmpnginx2=_tmpnginx2 @@ -109,16 +109,16 @@ _tmpnginx11=_tmpnginx11 # Sort all input lists alphabetically and remove any duplicates # ************************************************************* -sort -u $_input1 -o $_input1 -sort -u $_input2 -o $_input2 -sort -u $_input3 -o $_input3 -sort -u $_input4 -o $_input4 -sort -u $_input5 -o $_input5 -sort -u $_input6 -o $_input6 -sort -u $_input7 -o $_input7 -sort -u $_input8 -o $_input8 -sort -u $_input9 -o $_input9 -sort -u $_input10 -o $_input10 +sort -u ${_input1} -o ${_input1} +sort -u ${_input2} -o ${_input2} +sort -u ${_input3} -o ${_input3} +sort -u ${_input4} -o ${_input4} +sort -u ${_input5} -o ${_input5} +sort -u ${_input6} -o ${_input6} +sort -u ${_input7} -o ${_input7} +sort -u ${_input8} -o ${_input8} +sort -u ${_input9} -o ${_input9} +sort -u ${_input10} -o ${_input10} # *************************************************************** # Start and End Strings to Search for to do inserts into template @@ -163,14 +163,14 @@ _action4="3;" # GOOD USER AGENTS - Create and Insert # ************************************ -printf '%s\n' "$_start1" >> "$_tmpnginx1" +printf '%s\n' "${_start1}" >> ${_tmpnginx1} while IFS= read -r LINE do -printf '\t"~*%s%s%s"\t\t%s\n' "\b" "${LINE}" "\b" "$_action1" >> "$_tmpnginx1" -done < $_input1 -printf '%s\n' "$_end1" >> "$_tmpnginx1" -mv $_tmpnginx1 $_inputdb1 -ed -s $_inputdb1<<\IN +printf '\t"~*%s%s%s"\t\t%s\n' "\b" "${LINE}" "\b" "${_action1}" >> ${_tmpnginx1} +done < ${_input1} +printf '%s\n' "${_end1}" >> ${_tmpnginx1} +mv ${_tmpnginx1} ${_inputdb1} +ed -s ${_inputdb1}<<\IN 1,/# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/d /# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###/,$d ,d @@ -183,7 +183,7 @@ ed -s $_inputdb1<<\IN w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/globalblacklist.template q IN -rm $_inputdb1 +rm ${_inputdb1} # ******************************** # ALLOWED BOTS - Create and Insert