From 27cfe85396da351a340b83ac22dac6648d333330 Mon Sep 17 00:00:00 2001 From: litagin02 Date: Wed, 27 Dec 2023 09:45:16 +0900 Subject: [PATCH] Fix: non-CRLF errrrrrr --- .gitattribute | 1 - scripts/Install-Style-Bert-VITS2.bat | 1 - scripts/Setup-Python.bat | 1 - scripts/Setup.bat | 95 ++++++++++++++-------------- 4 files changed, 47 insertions(+), 51 deletions(-) delete mode 100644 .gitattribute diff --git a/.gitattribute b/.gitattribute deleted file mode 100644 index 69b47b5..0000000 --- a/.gitattribute +++ /dev/null @@ -1 +0,0 @@ -*.bat text eol=crlf diff --git a/scripts/Install-Style-Bert-VITS2.bat b/scripts/Install-Style-Bert-VITS2.bat index 7c85ae9..f07cfdb 100644 --- a/scripts/Install-Style-Bert-VITS2.bat +++ b/scripts/Install-Style-Bert-VITS2.bat @@ -1,5 +1,4 @@ @REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変 -@REM 改行コードがLFでうまくいかないのでCRLFに変更 @echo off chcp 65001 > NUL diff --git a/scripts/Setup-Python.bat b/scripts/Setup-Python.bat index c06ccb1..70d7a24 100644 --- a/scripts/Setup-Python.bat +++ b/scripts/Setup-Python.bat @@ -1,5 +1,4 @@ @REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変 -@REM 改行コードがLFでうまくいかないのでCRLFに変更 @echo off chcp 65001 > NUL diff --git a/scripts/Setup.bat b/scripts/Setup.bat index 00f2305..71506d3 100644 --- a/scripts/Setup.bat +++ b/scripts/Setup.bat @@ -1,48 +1,47 @@ -@REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変 -@REM 改行コードがLFでうまくいかないのでCRLFに変更 - -@echo off -chcp 65001 > NUL -pushd %~dp0.. -set PS_CMD=PowerShell -Version 5.1 -ExecutionPolicy Bypass - -set CURL_CMD=C:\Windows\System32\curl.exe -if not exist %CURL_CMD% ( - echo [ERROR] %CURL_CMD% が見つかりません。 - pause & popd & exit /b 1 -) - -echo 以下の配布元から関連ファイルをダウンロードして使用します(URL を Ctrl + クリックで開けます)。 -echo https://www.python.org/ -echo https://github.com/pypa/get-pip -echo https://github.com/litagin02/Style-Bert-VITS2/ -echo よろしいですか? [y/n] -set /p YES_OR_NO= -if /i not "%YES_OR_NO%" == "y" ( popd & exit /b 1 ) - -if not exist lib\ ( mkdir lib ) - -if not exist Style-Bert-VITS2\ ( - %CURL_CMD% -Lo Style-Bert-VITS2.zip https://github.com/litagin02/Style-Bert-VITS2/archive/refs/heads/master.zip - if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - - %PS_CMD% Expand-Archive -Path Style-Bert-VITS2.zip -DestinationPath . -Force - if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - - del Style-Bert-VITS2.zip - if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) -) - -call %~dp0Setup-Python.bat ..\lib\python ..\Bert-VITS2\venv -if %errorlevel% neq 0 ( popd & exit /b %errorlevel% ) - -pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -pip install -r Bert-VITS2\requirements.txt -if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) - -pushd Bert-VITS2 -python initialize.py - -popd +@REM https://github.com/Zuntan03/EasyBertVits2 より引用・改変 + +@echo off +chcp 65001 > NUL +pushd %~dp0.. +set PS_CMD=PowerShell -Version 5.1 -ExecutionPolicy Bypass + +set CURL_CMD=C:\Windows\System32\curl.exe +if not exist %CURL_CMD% ( + echo [ERROR] %CURL_CMD% が見つかりません。 + pause & popd & exit /b 1 +) + +echo 以下の配布元から関連ファイルをダウンロードして使用します(URL を Ctrl + クリックで開けます)。 +echo https://www.python.org/ +echo https://github.com/pypa/get-pip +echo https://github.com/litagin02/Style-Bert-VITS2/ +echo よろしいですか? [y/n] +set /p YES_OR_NO= +if /i not "%YES_OR_NO%" == "y" ( popd & exit /b 1 ) + +if not exist lib\ ( mkdir lib ) + +if not exist Style-Bert-VITS2\ ( + %CURL_CMD% -Lo Style-Bert-VITS2.zip https://github.com/litagin02/Style-Bert-VITS2/archive/refs/heads/master.zip + if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) + + %PS_CMD% Expand-Archive -Path Style-Bert-VITS2.zip -DestinationPath . -Force + if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) + + del Style-Bert-VITS2.zip + if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) +) + +call %~dp0Setup-Python.bat ..\lib\python ..\Bert-VITS2\venv +if %errorlevel% neq 0 ( popd & exit /b %errorlevel% ) + +pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 +if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) + +pip install -r Bert-VITS2\requirements.txt +if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) + +pushd Bert-VITS2 +python initialize.py + +popd