Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install reqired tlmgr in install script if necessary #215

Merged
merged 12 commits into from Mar 20, 2024

Conversation

howcanunot
Copy link
Contributor

tlmgr is part of texlive package. We don't really want to install the full package, so if the utility was not installed before running the script, we try to install it with minimal dependencies, since installing the whole package can take a lot of time and about 6 GB of disk space

Also a bit of code refactoring to remove unnecessary copy-paste

#174

steps/install.sh Outdated
echo "Install 'parallel' somehow"
exit 1
install_or_quit() {
if ! dpkg -s "$1" >/dev/null 2>&1; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@howcanunot there is no dpkg in MacOS :)

steps/install.sh Outdated
exit 1
fi
fi
install_or_quit 'python3-pygments'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@howcanunot there is no python3-pygments in MacOS when pygmentize is installed

steps/install.sh Outdated
install_or_quit 'aspell'
install_or_quit 'xmlstarlet'

if [ ! -f "/usr/local/texlive/$(date +%Y)/bin/x86_64-linux/tlmgr" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@howcanunot how about MacOS?

@yegor256
Copy link
Owner

@howcanunot appreciate your contribution! Please, try to run make clean lint locally, to make sure your scripts don't violate quality rules. Also, don't forget that the scripts are multi-platform: they have to work both on MacOS and Ubuntu and CentOS

@yegor256 yegor256 closed this Mar 18, 2024
@yegor256 yegor256 reopened this Mar 18, 2024
@howcanunot
Copy link
Contributor Author

@yegor256 good evening! improved the script to satisfy the multiplatform condition.
linter checks is ok

steps/install.sh Outdated
fi
fi
TEXLIVE_DIR=$(ls -d /usr/local/texlive/"$(date +%Y)"/bin/*/)
PATH="$PATH:$TEXLIVE_DIR"
Copy link
Owner

@yegor256 yegor256 Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@howcanunot I believe, it should be export PATH=... Otherwise, the changes you make will only be visible inside this script. Is is what you intend to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@howcanunot I still think that it's wrongly placed. What if texlive is already installed on my machine? You still want to modify my PATH?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 well, it won't be worse
but in general it's more logical to put the PATH inside the if.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@howcanunot
Copy link
Contributor Author

howcanunot commented Mar 20, 2024

@yegor256 Can you please help with debugging the bibcop check? I'm not sure I understand how to fix it...
It fails for both my pr's

Or i just should wait for the fix and then pull.

@yegor256 yegor256 merged commit de0da73 into yegor256:master Mar 20, 2024
6 of 7 checks passed
@yegor256
Copy link
Owner

@howcanunot thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants