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
|
2015-12-28 20:29:03 +01:00
|
|
|
echo "Below a list of user contributed **rofi** themes." >> README.md
|
2015-12-10 21:13:02 +01:00
|
|
|
echo "" >> README.md
|
2015-12-28 20:32:08 +01:00
|
|
|
|
|
|
|
THEMES=( $(ls Themes/*.theme) )
|
|
|
|
for a in ${THEMES[@]}
|
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}
|
2015-12-11 09:08:12 +01:00
|
|
|
IMAGE="Screenshots/${NAME}.png"
|
2015-12-11 09:09:49 +01:00
|
|
|
echo "# ${NAME}" >> README.md
|
2015-12-28 20:23:37 +01:00
|
|
|
echo "" >> README.md
|
2015-12-11 09:08:12 +01:00
|
|
|
if [ ${a} -nt ${IMAGE} ]
|
|
|
|
then
|
|
|
|
./rofi/script/rofi-create-screenshot.sh "${a}" "${IMAGE}"
|
2015-12-11 09:12:11 +01:00
|
|
|
git add "${IMAGE}"
|
2015-12-11 09:08:12 +01:00
|
|
|
git add "${a}"
|
|
|
|
fi
|
2015-12-11 09:09:49 +01:00
|
|
|
echo "## Screenshot" >> README.md
|
2015-12-28 20:23:37 +01:00
|
|
|
echo "" >> README.md
|
2015-12-11 09:09:49 +01:00
|
|
|
echo "![Screenshot](./${IMAGE})" >> README.md
|
2015-12-28 20:23:37 +01:00
|
|
|
echo "" >> README.md
|
2015-12-11 09:09:49 +01:00
|
|
|
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
|
2015-12-11 09:09:49 +01:00
|
|
|
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
|