DEBUG=false JSON=public/perro.json # Va a la raĆ­z del repo cd $(dirname $0)/.. # Actualiza el repo if [ $DEBUG = false ]; then git pull --quiet fi # Limpia sitio if [ -d "public" ]; then rm -rf public; fi mkdir public cp -r src/* public rm public/*.* # Descarga info de GitLab curl --request GET \ -s -o $JSON \ -H "Authorization: Token $(<.token)" \ "https://linkding.cuates.net/api/bookmarks/?q=%23blog" # Rehace sitio y JSON python3 ./scripts/make.py $JSON # Hace commit al repo si hubo cambios if [ $DEBUG = false ] && [ -n "$(git status --porcelain)" ]; then git add . git commit -m "ActualizaciĆ³n" git push origin git push cuates fi # Limpia variables unset DEBUG unset JSON