summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update_site.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/update_site.sh b/scripts/update_site.sh
new file mode 100755
index 0000000..411069f
--- /dev/null
+++ b/scripts/update_site.sh
@@ -0,0 +1,13 @@
+mkdir ./_widgets
+for D in *; do
+ if [[ -d "${D}" ]] && [[ ${D} == *"-widget"* ]]; then
+ echo "${D}"
+ cp ${D}/README.md ./_widgets/${D}.md
+ sed -i '1s/^/---\nlayout: page\n---\n/' ./_widgets/${D}.md
+ mkdir -p ./assets/img/screenshots/${D}
+
+ find ${D}/ \( -name '*.jpg' -o -name '*.png' -o -name '*.gif' \) -exec cp '{}' ./assets/img/screenshots/${D} \;
+
+ sed -i "s/](\.\(\/screenshots\)\{0,1\}/](..\/awesome-wm-widgets\/assets\/img\/screenshots\/$D/g" ./_widgets/${D}.md
+ fi
+done