@@ -107,31 +107,22 @@ function versions() {
107107
108108function install() {
109109 versions
110+ if ! command -v uv & > /dev/null; then
111+ if ! command -v curl & > /dev/null; then
112+ error " uv and curl are not installed. Please install one of them."
113+ exit 1
114+ fi
115+ info " install uv"
116+ curl -LsSf https://astral.sh/uv/install.sh | sh
117+ fi
110118 info " install package"
111- if [ " $# " -eq " 0" ]; then
112- uv sync --editable --extra all
119+ uv sync --editable --all-extras
120+ info " install markdown linter"
121+ if command -v npm > /dev/null 2>&1 ; then
122+ npm install --no-save markdownlint-cli2
113123 else
114- uv add " $@ "
115-
116- # check if "doc" extra should be installed
117- install_doc=false
118- for value in " $@ " ; do
119- value=" ${value// [[:blank:]]/ } "
120- [[ " $value " =~ \[ (.* ,)? (doc| all)(,.* )? \] ]] && install_doc=true
121- done
122- if [[ " $install_doc " == " true" ]]; then
123- info " install markdown linter"
124- if command -v npm > /dev/null 2>&1 ; then
125- npm install --no-save markdownlint-cli2
126- else
127- warn " npm not found, skipping markdownlint-cli2 installation"
128- fi
129- fi
124+ warn " npm not found, skipping markdownlint-cli2 installation"
130125 fi
131- # info "post-install"
132- # py_pack_dir="$(python -c 'import site; print(site.getsitepackages()[0])')"
133- # info " + setup user documentation plugins"
134- # cp "$py_pack_dir/plantuml_markdown.py" "$py_pack_dir/markdown/extensions/"
135126}
136127
137128function clean() {
0 commit comments