From 502f36bcdb847c4a8e1fe8659a6cd2de7aba6596 Mon Sep 17 00:00:00 2001 From: Stuart Laughlin Date: Tue, 11 Oct 2016 11:57:15 -0500 Subject: [PATCH 1/2] Allows Lektor to be installed without prompt by setting env var. --- assets/install.sh | 9 +++++++-- content/docs/installation/contents.lr | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/install.sh b/assets/install.sh index 602a9eb0..2c478487 100644 --- a/assets/install.sh +++ b/assets/install.sh @@ -38,6 +38,11 @@ if 1: os.path.join(os.environ['HOME'], '.bin'), os.path.join(os.environ['HOME'], '.local', 'bin')] + if os.environ.get('LEKTOR_SILENT') == None: + prompt = True + else: + prompt = False + def find_user_paths(): rv = [] for item in os.environ['PATH'].split(':'): @@ -95,7 +100,7 @@ if 1: print ' and remove this symlink:' print ' %s' % symlink_path print - get_confirmation() + if prompt: get_confirmation() print wipe_installation(lib_dir, symlink_path) @@ -141,7 +146,7 @@ if 1: print ' app: %s' % lib_dir print - get_confirmation() + if prompt: get_confirmation() for url in json.load(urllib.urlopen(VENV_URL))['urls']: if url['python_version'] == 'source': diff --git a/content/docs/installation/contents.lr b/content/docs/installation/contents.lr index 458f101d..b371f7b8 100644 --- a/content/docs/installation/contents.lr +++ b/content/docs/installation/contents.lr @@ -44,6 +44,7 @@ get Lektor installed with our installation script: ``` $ curl -sf https://www.getlektor.com/install.sh | sh ``` +If you would like to install Lektor without being prompted, set LEKTOR_SILENT before running the prior command. For Windows you can use the `command prompt`: From 885ddf2b0880fbac1ee74f201dc4b1c626321203 Mon Sep 17 00:00:00 2001 From: Joseph Nix Date: Wed, 17 Jan 2018 17:18:31 -0600 Subject: [PATCH 2/2] formatting tweak --- assets/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/install.sh b/assets/install.sh index 97bac59f..0dd0bbf2 100644 --- a/assets/install.sh +++ b/assets/install.sh @@ -103,7 +103,8 @@ if 1: print(' and remove this symlink:') print(' %s' % symlink_path) print() - if prompt: get_confirmation() + if prompt: + get_confirmation() print() wipe_installation(lib_dir, symlink_path)