summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuah Khan <skhan@linuxfoundation.org>2019-09-18 18:37:54 -0600
committerJonathan Corbet <corbet@lwn.net>2019-10-01 06:54:14 -0600
commit2730ce017fa6df49bad9ad932932b863f63a4b50 (patch)
tree0eb6e89848f42583f7b178874b0ac605a3cf0ac2
parent6ee0fac199e108f544b0ac23b2419a03ff6dc18f (diff)
downloadlinux-2730ce017fa6df49bad9ad932932b863f63a4b50.tar.bz2
scripts/sphinx-pre-install: add how to exit virtualenv usage message
Add usage message on how to exit the virtualenv after documentation work is done. Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rwxr-xr-xscripts/sphinx-pre-install8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 3b638c0e1a4f..013099cd120d 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -645,6 +645,12 @@ sub check_distros()
# Common dependencies
#
+sub deactivate_help()
+{
+ printf "\tIf you want to exit the virtualenv, you can use:\n";
+ printf "\tdeactivate\n";
+}
+
sub check_needs()
{
# Check for needed programs/tools
@@ -686,6 +692,7 @@ sub check_needs()
if ($need_sphinx && scalar @activates > 0 && $activates[0] ge $min_activate) {
printf "\nNeed to activate a compatible Sphinx version on virtualenv with:\n";
printf "\t. $activates[0]\n";
+ deactivate_help();
exit (1);
} else {
my $rec_activate = "$virtenv_dir/bin/activate";
@@ -697,6 +704,7 @@ sub check_needs()
printf "\t$virtualenv $virtenv_dir\n";
printf "\t. $rec_activate\n";
printf "\tpip install -r $requirement_file\n";
+ deactivate_help();
$need++ if (!$rec_sphinx_upgrade);
}