Commit 82398975 authored by remy's avatar remy
Browse files

multiple plugins allowed (separated with ',')

parent 379a67a9
......@@ -31,6 +31,8 @@
# regenerer tous les checksums
#set -x
CURDIR=`pwd`
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WORKDIR=${DIR}/workdir
......@@ -70,16 +72,16 @@ function remove_dyn_elems {
# listing of dynamic elements, depending on product solution
wp_regexp_arr=("search-form" "cropped")
wp_regexp_plugin_wedevsprojectmanager='pusher.+ver='
wp_regexp_plugin_wedevsprojectmanager="pusher.+ver="
wp_regexp_plugin_gravityform='ajax.php'
wp_regexp_plugin_calendar=' id=\"today\"'
wp_regexp_plugin_rsswidget='rsswidget'
wp_regexp_plugin_calendar="\sid=\"today\""
wp_regexp_plugin_rsswidget="rsswidget"
gitlab_regexp_arr=("authenticity_token" "csrf-token")
typesetter_regexp_arr=("wgBackendResponseTime" "wgRequestId" "time" "[0-9]{1,3}\.[0-9]{1,2}+%\s+[0-9]{1}\.[0-9]{3}")
nextcloud_regexp_arr=("token" "nonce")
gitbook_regexp='data-revision'
while read name website type product plugin activity owner
while read name website type product plugins activity owner
do
if [[ "${name}" =~ [[:space:]]*# ]] || [[ "${name}" == "" ]] || [[ "${activity}" == "inactive" ]]; then
continue
......@@ -91,22 +93,26 @@ function remove_dyn_elems {
do
sed -ri -e /$wp_regexp/d $name.index.html
done
case $plugin in
"wedevs-project-manager" )
sed -ri -e /$wp_regexp_plugin_wedevsprojectmanager/d $name.index.html
;;
"rsswidget" )
sed -ri -e /$wp_regexp_plugin_rsswidget/d $name.index.html
;;
"gravityform" )
sed -ri -e /$wp_regexp_plugin_gravityform/d $name.index.html
;;
"calendar" )
sed -ri -e /$wp_regexp_plugin_calendar/d $name.index.html
;;
* )
;;
esac
plugins_nl=$(echo $plugins | tr "," "\n")
for plugin in $plugins_nl
do
case $plugin in
"wedevs-project-manager" )
sed -ri -e /$wp_regexp_plugin_wedevsprojectmanager/d $name.index.html
;;
"rsswidget" )
sed -ri -e /$wp_regexp_plugin_rsswidget/d $name.index.html
;;
"gravityform" )
sed -ri -e /$wp_regexp_plugin_gravityform/d $name.index.html
;;
"calendar" )
sed -ri -e /$wp_regexp_plugin_calendar/d $name.index.html
;;
* )
;;
esac
done
;;
"typesetter" )
for typesetter_regexp in ${typesetter_regexp_arr[@]}
......@@ -164,7 +170,7 @@ fi
cd ${WORKDIR}
rm status.log *.html sha256sum.txt 2>/dev/null
while read name website type product plugin activity owner
while read name website type product plugins activity owner
do
if [[ "$name" =~ [[:space:]]*# ]] || [[ "$name" == "" ]] || [[ "$activity" == "inactive" ]]; then
continue
......@@ -214,7 +220,7 @@ if [ -z ${FIRST} ]; then
total=`cat sha256sum.txt*|wc -l`
rm checksums.json 2>/dev/null
echo "{" > checksums.json
while read name url type product plugin activity owner
while read name url type product plugins activity owner
do
if [[ "$name" =~ [[:space:]]*# ]] || [[ "$name" == "" ]] || [[ "$activity" == "inactive" ]]; then
continue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment