digiamp for review + append script

This commit is contained in:
RogueM 2016-06-27 00:22:51 +01:00
parent 552ad553d4
commit 3933d59867
3 changed files with 24 additions and 0 deletions

24
draft/append.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
draftmd="../draft/overlay"
draftpng="../draft/boards"
dirmd="../src/en/overlay"
dirpng="../resources/boards"
tmpmd="$dirmd/template.md"
tmppng="$dirpng/template.png"
yamlfile="../src/en/settings.yaml"
mdlist=$(ls "$draftmd")
cp -R $draftmd/* $dirmd && rm $tmpmd
cp -R $draftpng/* $dirpng && rm $tmppng
for overlay in $mdlist; do
if [ $overlay != "template.md" ]; then
board=$(echo "$overlay" | rev | cut -c 4- | rev)
if ! grep -e $board $yamlfile &> /dev/null; then
echo "- $board" | tee -a $yamlfile &> /dev/null
fi
fi
done
exit 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB