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

fix #2 #4

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,16 @@ rm -rf "${typst_install:?}/$folder"

echo "Typst installed to $typst_install/bin/typst$exe_ext"

if command -v typst >/dev/null; then
echo "Run 'typst$exe_ext --help' to get started"
else
if ! command -v typst >/dev/null; then
case $SHELL in
/bin/zsh) shell_profile=".zshrc";;
*) shell_profile=".bashrc";;
esac
cat <<EOF
Manually add the directory to your \$HOME/$shell_profile (or similar)
export TYPST_INSTALL="$typst_install"
export PATH="\$TYPST_INSTALL/bin:\$PATH"

Example:
echo '# Typst' >> ~/$shell_profile
echo 'export TYPST_INSTALL="$typst_install"' >> ~/$shell_profile
echo 'export PATH="\$TYPST_INSTALL/bin:\$PATH"' >> ~/$shell_profile

Run '$typst_install/bin/typst$exe_ext --help' to get started
EOF
echo "Added '$typst_install/bin' to your \$PATH via ~/$shell_profile"
echo "Run 'exec \$SHELL' to restart your shell and have 'typst' available"
fi

echo "Run 'typst --help' to get started"
echo "Stuck? Open an Issue https://github.com/typst-community/typst-installer/issues"
Loading