diff options
author | Matthew Sotoudeh <masotoudeh@ucdavis.edu> | 2020-08-18 15:08:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-18 15:08:35 -0700 |
commit | 20bf723dffea5aba9eee5101a1bcd9b8c9b2b90b (patch) | |
tree | 84e996886d566f12137d177bba145db5f348e116 | |
parent | 34c3543f58e9ff5b7e93415beda8cb53b80133c6 (diff) |
Complain when given a non-absolute path (#2)
Closes Issue #1 by requesting the user explicitly provide an absolute path.
-rwxr-xr-x | setup_texlive.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/setup_texlive.sh b/setup_texlive.sh index 5a553b0..f88782a 100755 --- a/setup_texlive.sh +++ b/setup_texlive.sh @@ -9,6 +9,12 @@ fi texlive_mount=$1 install_dir=$2 +if [[ ! $install_dir =~ ^/ ]] +then + echo "Please use an absolute path for the install directory." + exit 1 +fi + read -p "Installing TeX Live. This will *OVERWRITE* $install_dir. Continue? [y/N] " -r if [[ $REPLY =~ ^[Yy]$ ]] then @@ -46,4 +52,5 @@ then echo "run --define TEXLIVE_FULL_DIR=$install_dir" >> ~/.bazelrc else echo "Aborting." + exit 1 fi |