This PowerShell script is used to update the llama.cpp
repository to the latest version. It also moves the update_windows.ps1
script to the new directory and compiles the project using cmake
.
- Git
- CMake
- PowerShell
- Save the script as
update_windows.ps1
in yourllama.cpp
directory. - Open PowerShell and navigate to the directory containing
update_windows.ps1
. - Run the script with the command
./update_windows.ps1
.
- Stores the current working directory and its absolute path.
- Renames the current directory by appending ".old".
- Changes to the user's home directory.
- Checks if the
llama.cpp
directory already exists. If it does, it deletes it. - Clones the
llama.cpp
repository from GitHub. - Changes to the newly cloned repository directory.
- Moves the
update_windows.ps1
script to the new directory. - Prints the new
llama.cpp
directory path. - Creates a new directory for the build files.
- Changes to the new build directory.
- Runs
cmake
in the newly created directory. - Compiles the project with
cmake --build
. - Prompts the user to move the contents of the 'models' folder from the old directory to the new one.
- Prompts the user to move the contents of the 'prompts' folder from the old directory to the new one.
- Changes back to the new working directory (
llama.cpp
). - Pauses at the end and prompts the user to press Enter to exit.
- The script assumes that
git
andcmake
are installed on your machine and are available in your system's PATH. - The script will only work if
llama.cpp
is a git repository. - Always back up your files before running the script to prevent any data loss.
Apache 2.0 license