-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·39 lines (32 loc) · 1.03 KB
/
release.sh
File metadata and controls
executable file
·39 lines (32 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
root_dir=$script_dir/../..
# folder where the artifacts where downloaded
release_dir=$1
cd $release_dir
ls -R
# extract servers
mkdir servers
for arch in win-x64_noavx linux-x64_noavx osx-arm64_no-acc osx-x64_no-acc;do
unzip -o $arch.zip/$arch.zip -d servers llamalib*server*
done
chmod a+x servers/*
# extract runtimes
for d in *.zip;do
platform=`echo $d|cut -d'.' -f1|cut -d'_' -f1`
mkdir -p runtimes/$platform/native
unzip -o $d/$d -d runtimes/$platform/native -x llamalib*server*
done
rm -r *.zip
# copy includes
mkdir include
cp $root_dir/include/*.h* include/
cp $root_dir/third_party/llama.cpp/vendor/nlohmann/json.hpp include/
cp $root_dir/third_party/llama.cpp/vendor/cpp-httplib/httplib.h include/
# licenses
mkdir -p third_party_licenses
cp $root_dir/third_party/llama.cpp/LICENSE third_party_licenses/llama.cpp.LICENSE.txt
# copy files from repo
cp $root_dir/LICENSE ./
cp $root_dir/VERSION ./
cp $root_dir/cmake/*.cmake ./