Skip to content

Commit

Permalink
#254 better error log
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 30, 2024
1 parent 51f7d88 commit 18319c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions help/texlive-bin.sh
Expand Up @@ -30,14 +30,14 @@ fi

root=/usr/local/texlive
if [ ! -e "${root}" ]; then
echo "The directory with TeXLive does exist: ${root}"
echo "The directory with TeXLive does not exist: ${root}"
exit 1
fi
year=$(find "${root}/" -maxdepth 1 -type d -name '[0-9][0-9][0-9][0-9]' -exec basename {} \;)
arc=$(find "${root}/${year}/bin/" -type d -maxdepth 1 -name '*-*' -exec basename {} \;)
bin=${root}/${year}/bin/${arc}
if [ ! -e "${bin}" ]; then
echo "The directory with TeXLive does exist: ${bin}"
echo "The directory with TeXLive does not exist: ${bin}"
exit 1
fi
PATH=${bin}:${PATH}
Expand All @@ -46,4 +46,4 @@ if ! tlmgr --version >/dev/null 2>&1; then
exit 1
fi

echo -n "${bin}"
echo -n "${bin}"
1 change: 1 addition & 0 deletions tests/help/test-texlive-bin.sh
Expand Up @@ -26,6 +26,7 @@ set -o pipefail
stdout=$2

{
"${LOCAL}/help/texlive-bin.sh"
path=$("${LOCAL}/help/texlive-bin.sh")
echo "${path}" | grep '/bin'
} > "${stdout}" 2>&1
Expand Down

0 comments on commit 18319c4

Please sign in to comment.