Skip to content

Instantly share code, notes, and snippets.

@lovelock
Created January 31, 2023 15:39
Show Gist options
  • Save lovelock/5309c1879d92cded942d1efbaccc8bd4 to your computer and use it in GitHub Desktop.
Save lovelock/5309c1879d92cded942d1efbaccc8bd4 to your computer and use it in GitHub Desktop.
install latest squirrel input method
#!/usr/bin/env bash
SQUIRREL_DIR=$(PWD)/squirrel
LIBRIME_DIR=${SQUIRREL_DIR}/librime
if [ ! -d ${SQUIRREL_DIR} ]; then
git clone --recursive https://github.com/rime/squirrel.git ${SQUIRREL_DIR}
else
git -C ${SQUIRREL_DIR} pull origin master
fi
# if clone failed, exit the installtation
cd squirrel || exit
# download latest librime
if [ -d ${LIBRIME_DIR} ];then
git -C ${LIBRIME_DIR} pull origin master
else
git clone --recursive https://github.com/rime/librime.git ${LIBRIME_DIR}
fi
# compile libboost
make -C ${LIBRIME_DIR} xcode/deps/boost
# make
export BUILD_UNIVERSAL=0
# build all deps
make deps
# build squirrel
make ARCHS="$(uname -m)"
# install squirrel
make ARCHS="$(uname -m)" install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment