speedie-overlay/push.sh
2022-11-11 16:17:19 +01:00

20 lines
848 B
Bash
Executable file

#!/bin/sh
git add *
#https://gist.github.com/praveen-palanisamy/31795f2680bc3ade04dd8d78d8651ee9
tree -I md5 -f --noreport --charset ascii | grep -vE "profiles|metadata|md5|Manifest|README|xml|repo_name|conf|directories|push|tree|" | tail -n+2 > .tree-orig
tree -I md5 -f --noreport --charset ascii | grep -vE "profiles|metadata|md5|Manifest|README|xml|repo_name|conf|directories|push|tree|" | sed -e 's/| \+/ /g' -e 's/[|`]-\+/ */g' -e 's:\(* \)\(\(.*/\)\([^/]\+\)\):\1[\4](\2):g' | tail -n+2 > .tree
cp -f README.tp.md README.md
printf "\n## List of all ebuilds\n" >> README.md
cat .tree-orig >> README.md
markdown README.md > README.html
cp -f README.tp.md README.md
printf "\n## List of all ebuilds\n" >> README.md
cat .tree >> README.md
rm -f .tree .tree-orig
git commit -m "Update overlay" && git push && printf "Successfully pushed\n"