sentencepiece/python/build_bundled.sh
2020-10-21 19:28:09 +09:00

19 lines
387 B
Bash
Executable File

#!/bin/sh
VERSION="$1"
mkdir bundled
cd bundled
# Try taged version. Othewise, use head.
git clone https://github.com/google/sentencepiece.git \
-b v"${VERSION}" --depth 1 || \
git clone https://github.com/google/sentencepiece.git --depth 1
cd sentencepiece
mkdir build
cd build
cmake .. -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=../..
make -j $(nproc)
make install
cd ../..