Skip to content

Instantly share code, notes, and snippets.

@hatashiro
Created January 18, 2022 09:01
Show Gist options
  • Save hatashiro/1ebbd5ed6607d4e191395bba682fdf59 to your computer and use it in GitHub Desktop.
Save hatashiro/1ebbd5ed6607d4e191395bba682fdf59 to your computer and use it in GitHub Desktop.
Copy Mozc binaries after build
#!/usr/bin/env bash
# Please run after `bazel build package --config oss_linux -c opt`.
LIB_MOZC=/usr/lib/mozc
LIB_IBUS_MOZC=/usr/lib/ibus-mozc
SHARE_IBUS_COMPONENT=/usr/share/ibus/component
SHARE_IBUS_MOZC=/usr/share/ibus-mozc
BIN=/usr/bin
# Create directories.
mkdir -p $LIB_MOZC
mkdir -p $LIB_IBUS_MOZC
mkdir -p $SHARE_IBUS_MOZC
# Copy binaries
cp -f bazel-bin/gui/tool/mozc_tool $LIB_MOZC
cp -f bazel-bin/renderer/mozc_renderer $LIB_MOZC
cp -f bazel-bin/server/mozc_server $LIB_MOZC
cp -f bazel-bin/unix/ibus/ibus_mozc $LIB_IBUS_MOZC/ibus-engine-mozc
cp -f bazel-bin/unix/emacs/mozc_emacs_helper $BIN
cp -f bazel-bin/unix/ibus/mozc.xml $SHARE_IBUS_COMPONENT
unzip -o bazel-bin/unix/icons.zip -d $SHARE_IBUS_MOZC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment