From 567e4047c566ff974e0817880a73377203d43c14 Mon Sep 17 00:00:00 2001 From: Elias Zeitfogel Date: Sat, 19 Dec 2015 15:03:40 +0100 Subject: [PATCH] Switched to powershell --- assets/{install.bat => install.ps1} | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) rename assets/{install.bat => install.ps1} (93%) diff --git a/assets/install.bat b/assets/install.ps1 similarity index 93% rename from assets/install.bat rename to assets/install.ps1 index bd7c0f81..26c25e89 100644 --- a/assets/install.bat +++ b/assets/install.ps1 @@ -1,5 +1,4 @@ -@echo off & python --version 2> NUL & IF ERRORLEVEL 1 ( ECHO To use this script you need to have Python installed & goto :eof ) ELSE ( python -x "%~f0" %* & goto :eof ) - +$InstallScript = @" import os import sys import json @@ -13,7 +12,7 @@ import ctypes from ctypes.wintypes import HWND, UINT, WPARAM, LPARAM, LPVOID -VENV_URL = "https://pypi.python.org/pypi/virtualenv/json" +VENV_URL = 'https://pypi.python.org/pypi/virtualenv/json' APPDATA = os.environ['LocalAppData'] APP = 'lektor-cli' LIB = 'lib' @@ -113,3 +112,7 @@ def main(): print 'All done!' main() +"@ + + +if (Get-Command python) { python -c $InstallScript } else { "To use this script you need to have Python installed"; exit }