Преглед на файлове

Add update_rss-bridge.sh

poesty преди 1 година
родител
ревизия
021feda66c
променени са 3 файла, в които са добавени 12 реда и са изтрити 5 реда
  1. 4 4
      update/update_mdbook.sh
  2. 7 0
      update/update_rss-bridge.sh
  3. 1 1
      update/update_soapbox.sh

+ 4 - 4
update/update_mdbook.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-cd /root/BookStack2Site/ && rm -r book-test/src book-test/book
+cd /root/BookStack2Site/ && rm -r book-test/src/ book-test/book/
 BookStackEndpoint=""
 BookStackAPITokenID=
 BookStackAPITokenSecret=
@@ -10,9 +10,9 @@ bin/bookstack2site --bookstack-url=${BookStackEndpoint} --token-id=${BookStackAP
 # success label is not supported
 # mdbook-regex is also suggested
 cd book-test 
-find . -name "*.md" -exec sed -i 's/<p class="callout info">\(.*\)<\/p>/```admonish info\n\1\n```/g' {} \;
-find . -name "*.md" -exec sed -i 's/<p class="callout warning">\(.*\)<\/p>/```admonish warning\n\1\n```/g' {} \;
-find . -name "*.md" -exec sed -i 's/<p class="callout danger">\(.*\)<\/p>/```admonish danger\n\1\n```/g' {} \;
+find . -name "*.md" -exec sed -i 's/<p class="callout info">\(.*\)<\/p>/```admonish info\n\1\n```/g' {} +
+find . -name "*.md" -exec sed -i 's/<p class="callout warning">\(.*\)<\/p>/```admonish warning\n\1\n```/g' {} +
+find . -name "*.md" -exec sed -i 's/<p class="callout danger">\(.*\)<\/p>/```admonish danger\n\1\n```/g' {} +
 # build static pages
 ../bin/mdbook build
 ../bin/mdbook-sitemap-generator -d ${MdBookSite} -o book/sitemap.xml

+ 7 - 0
update/update_rss-bridge.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+cd /root
+wget https://github.com/Rss-Bridge/rss-bridge/archive/master.zip
+unzip master.zip
+find rss-bridge-master/ -name "*.php" -exec sed -i "s/parse_ini_file(\([^,]*\),.*)/parse_ini_string(file_get_contents(\1), true, INI_SCANNER_TYPED)/g" {} +
+lftp -c "set sftp:auto-confirm yes; open sftp://[REDACTED]; mirror -Rev rss-bridge-master/ [REMOTE]/ --only-newer --parallel=10 -X config.ini.php -X whitelist.default.txt -X cache/"
+rm -r rss-bridge-master/ master.zip

+ 1 - 1
update/update_soapbox.sh

@@ -3,4 +3,4 @@ cd /root
 curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/develop/download\?job\=build-production -o soapbox.zip
 unzip soapbox.zip
 lftp -c "set sftp:auto-confirm yes; open sftp://[REDACTED]; mirror -Rev static/ [REMOTE]/ --only-newer --parallel=10 -X .htaccess -X favicon.ico"
-rm -r static soapbox.zip
+rm -r static/ soapbox.zip