Skip to content

Commit

Permalink
install on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 11, 2024
1 parent 9a43411 commit 94d0811
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,6 +1,6 @@
javalang==0.13.0
pygments==2.17.2
flake8==6.1.0
flake8==7.0.0
pylint==3.0.3
multimetric==2.1.0
chardet==5.2.0
24 changes: 16 additions & 8 deletions steps/install.sh
Expand Up @@ -24,9 +24,17 @@
set -e
set -o pipefail

if [ ! "$(id -u)" = 0 ]; then
echo "You should run it as root: 'sudo make install'"
exit 1
if [ -n "${linux}" ]; then
SUDO=
else
SUDO=sudo
fi

if [ -n "${linux}" ]; then
if [ ! "$(id -u)" = 0 ]; then
echo "You should run it as root: 'sudo make install'"
exit 1
fi
fi

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
Expand Down Expand Up @@ -105,14 +113,14 @@ fi
if [ ! -e "${HOME}/texmf" ]; then
tlmgr init-usertree
fi
tlmgr option repository ctan
tlmgr --verify-repo=none update --self
$SUDO tlmgr option repository ctan
$SUDO tlmgr --verify-repo=none update --self
declare -a packages=(href-ul huawei ffcode latexmk fmtcount trimspaces \
libertine paralist makecell footmisc currfile enumitem wrapfig \
lastpage biblatex titling svg catchfile transparent textpos fvextra \
xstring framed environ iexec anyfontsize changepage titlesec upquote hyperxmp biber)
tlmgr --verify-repo=none install "${packages[@]}"
tlmgr --verify-repo=none update "${packages[@]}"
$SUDO tlmgr --verify-repo=none install "${packages[@]}"
$SUDO tlmgr --verify-repo=none update "${packages[@]}"

if ! pygmentize -V >/dev/null 2>&1; then
if [ -n "${linux}" ]; then
Expand All @@ -123,7 +131,7 @@ if ! pygmentize -V >/dev/null 2>&1; then
fi
fi

python3 -m pip install -r "${LOCAL}/requirements.txt"
$SUDO python3 -m pip install -r "${LOCAL}/requirements.txt"

gem install --no-document rubocop -v 1.56.3
gem install --no-document octokit -v 4.21.0
Expand Down

0 comments on commit 94d0811

Please sign in to comment.