From 5ee5aa585b837479599a04b14f72551bee95cf60 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 27 Sep 2022 18:30:30 +0900 Subject: [PATCH] new: pwsh : luajit installation script --- bin/windows/luajit/install_luajit.ps1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bin/windows/luajit/install_luajit.ps1 diff --git a/bin/windows/luajit/install_luajit.ps1 b/bin/windows/luajit/install_luajit.ps1 new file mode 100644 index 0000000..8396594 --- /dev/null +++ b/bin/windows/luajit/install_luajit.ps1 @@ -0,0 +1,22 @@ +# installing luajit under %localappdata%\Programs + +# download and build +git clone https://luajit.org/git/luajit.git +cd luajit +make + +# installing +$luajit_location = Join-Path $env:LOCALAPPDATA "Programs\luajit" +mkdir $luajit_location +cp .\src\luajit.exe, .\src\lua51.dll $luajit_location +mkdir $luajit_location\lua +mkdir $luajit_location\lua\jit +cp .\src\jit\* $luajit_location\lua\jit + +# add to path +while($true) { + $input = Read-Host "add $env:LOCALAPPDATA\Programs\luajit to `$PATH. (Y)" + if ($input = 'Y') { + break + } +}