rofi-themes/update.sh

39 lines
1.2 KiB
Bash
Raw Normal View History

2015-12-10 21:13:02 +01:00
#!/usr/bin/env bash
git submodule update --init
2015-12-10 21:20:41 +01:00
# Empty file.
echo "" > README.md
# Fill it
2015-12-10 21:13:02 +01:00
echo "# Rofi Themes: " >> README.md
echo "" >> README.md
2015-12-11 16:45:13 +01:00
for a in Themes/*.theme
2015-12-10 21:13:02 +01:00
do
2015-12-11 16:45:13 +01:00
FILE=$(basename $a)
echo "File: ${FILE}"
NAME=${FILE%.theme}
IMAGE="Screenshots/${NAME}.png"
echo "# ${NAME}" >> README.md
2015-12-28 20:23:37 +01:00
echo "" >> README.md
if [ ${a} -nt ${IMAGE} ]
then
./rofi/script/rofi-create-screenshot.sh "${a}" "${IMAGE}"
2015-12-11 09:12:11 +01:00
git add "${IMAGE}"
git add "${a}"
fi
echo "## Screenshot" >> README.md
2015-12-28 20:23:37 +01:00
echo "" >> README.md
echo "![Screenshot](./${IMAGE})" >> README.md
2015-12-28 20:23:37 +01:00
echo "" >> README.md
echo "## XResources" >> README.md
2015-12-28 20:23:37 +01:00
echo "" >> README.md
2015-12-28 20:25:22 +01:00
echo "~~~" >> README.md
cat "${a}" >> README.md
2015-12-28 20:25:22 +01:00
echo "~~~" >> README.md
echo "" >> README.md
2015-12-10 21:13:02 +01:00
done
git add README.md