From 136815c165b72cdd427ea57f3aa19c442fc492f9 Mon Sep 17 00:00:00 2001 From: Spirit Date: Mon, 19 Aug 2024 10:58:10 -0700 Subject: [PATCH] Create `void-WSL2.bat` --- void-WSL2.bat | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 void-WSL2.bat diff --git a/void-WSL2.bat b/void-WSL2.bat new file mode 100644 index 0000000..5028f1a --- /dev/null +++ b/void-WSL2.bat @@ -0,0 +1,35 @@ +@echo off + +echo THIS SCRIPT IS NOT FULLY TESTED YET +echo use at ur own + +if not defined DISTRONAME set DISTRONAME=void +if not defined STORAGEPATH set STORAGEPATH=%cd% +if not defined USER set USER=spirit + +mkdir .void-on-WSL2.temp +cd .void-on-WSL2.temp + +echo downloading 7zr.exe... +curl.exe -Ls --remote-name --remove-on-error https://7-zip.org/a/7zr.exe +echo downloading void-x86_64-ROOTFS... +curl.exe -Ls --remote-name --remove-on-error https://repo-default.voidlinux.org/live/current/void-x86_64-ROOTFS-20240314.tar.xz +7zr.exe x void-x86_64-ROOTFS-20240314.tar.xz -oextracted + +wsl.exe --import %DISTRONAME% %STORAGEPATH% extracted\void-x86_64-ROOTFS-20240314.tar + +echo downloading init-void.sh and setup-void.sh... +curl.exe -Ls --remote-name --remove-on-error https://raw.githubusercontent.com/spirit-x64/scripts/main/init-void.sh +curl.exe -Ls --remote-name --remove-on-error https://raw.githubusercontent.com/spirit-x64/scripts/main/setup-void.sh + +wsl -d %DISTRONAME% -e sh -c "USERNAME=%USER% ./init-void.sh --wsl" + +wsl --terminate %DISTRONAME% +wsl -d %DISTRONAME% -e sh -c "./setup-void.sh --no-gui" + +cd .. +rd /s /q .void-on-WSL2.temp + +echo Void Linux ready (it could be, didn't check tho..) +echo Press any key to exit . . . +pause>nul