summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <masotoudeh@ucdavis.edu>2020-08-18 15:08:35 -0700
committerGitHub <noreply@github.com>2020-08-18 15:08:35 -0700
commit20bf723dffea5aba9eee5101a1bcd9b8c9b2b90b (patch)
tree84e996886d566f12137d177bba145db5f348e116
parent34c3543f58e9ff5b7e93415beda8cb53b80133c6 (diff)
Complain when given a non-absolute path (#2)
Closes Issue #1 by requesting the user explicitly provide an absolute path.
-rwxr-xr-xsetup_texlive.sh7
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback