forked from LostRuins/koboldcpp
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
141 changed files
with
123 additions
and
14,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
echo Create Version File | ||
:: Read the version string from koboldcpp.py | ||
for /f "tokens=2 delims== " %%A in ('findstr "KcppVersion" koboldcpp.py') do ( | ||
set "version=%%~A" | ||
goto :done | ||
) | ||
|
||
:done | ||
|
||
:: Display the extracted version (optional, for debugging) | ||
echo Extracted Version: %version% | ||
|
||
for /f "tokens=1,2 delims=." %%a in ("%version%") do ( | ||
set version_major=%%a | ||
set version_minor=%%b | ||
) | ||
|
||
echo Major Version: %version_major% | ||
echo Minor Version: %version_minor% | ||
|
||
:: Replace all instances of "MYVER" in foo.txt with the version | ||
( | ||
for /f "delims=" %%i in (version_template.txt) do ( | ||
set "line=%%i" | ||
set "line=!line:MYVER_MAJOR=%version_major%!" | ||
set "line=!line:MYVER_MINOR=%version_minor%!" | ||
echo !line! | ||
) | ||
) > "version.txt" | ||
|
||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
echo "Create Version File" | ||
extracted_ver=$(cat koboldcpp.py | grep 'KcppVersion = ' | cut -d '"' -f2) | ||
echo "Extracted Version: $extracted_ver" | ||
vmajor=$(echo $extracted_ver | cut -d '.' -f1) | ||
vminor=$(echo $extracted_ver | cut -d '.' -f2) | ||
echo "Major Version: $vmajor" | ||
echo "Minor Version: $vminor" | ||
cp version_template.txt version.txt | ||
sed -i "s/MYVER_MAJOR/$vmajor/g" version.txt | ||
sed -i "s/MYVER_MINOR/$vminor/g" version.txt |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.