This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/.circleci/org/update_docs
2021-07-07 05:40:23 -07:00

35 lines
844 B
Bash
Executable file

#!/usr/bin/env bash
## fix_docs Fixed(formats) Spacemacs' documentation files.
##
## Copyright (c) 2014-2021 Sylvain Benner & Contributors
##
## Author: Eugene Yaremenko
## URL: https://github.com/syl20bnr/spacemacs
##
## This file is not part of GNU Emacs.
##
## License: GPLv3
echo_headline "Generating new layers index file"
spacedoc layers \
-c".ci/spacedoc-cfg.edn" \
/tmp/sdn/layers
if [ $? -ne 0 ]; then
echo "Layers index generation failed."
exit 2
fi
if [ ! -f /tmp/sdn/layers/LAYERS.sdn ]; then
echo " /tmp/sdn/layers/LAYERS.sdn doesn't exist"
exit 2
fi
echo_headline "Generating new .org files from .sdn representation"
spacedoc orgify \
-c".ci/spacedoc-cfg.edn" \
/tmp/sdn/ \
~/.emacs.d/
if [ $? -ne 0 ]; then
echo "Documentation generation failed."
exit 2
fi