File: action-install-plugins-macos.sh

package info (click to toggle)
librime 1.13.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,896 kB
  • sloc: cpp: 34,796; ansic: 2,519; javascript: 443; sh: 225; makefile: 125
file content (22 lines) | stat: -rwxr-xr-x 691 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

export RIME_ROOT="$(cd "$(dirname "$0")"; pwd)"

echo "RIME_PLUGINS=${RIME_PLUGINS}" > version-info.txt
echo "librime $(git describe --always)" >> version-info.txt

function action_install_plugin() {
    local plugin="$1"
    local plugin_dir="$2"
    echo "${plugin} $(git -C "${plugin_dir}" describe --always)" >> version-info.txt
    if [[ -e "${plugin_dir}/action-install.sh" ]]; then
	    (cd "${plugin_dir}"; bash ./action-install.sh)
    fi
}

declare -fx action_install_plugin

if [[ -n "${RIME_PLUGINS}" ]]; then
    # intentionally unquoted: ${RIME_PLUGINS} is a space separated list of slugs
    bash ./install-plugins.sh run=action_install_plugin ${RIME_PLUGINS}
fi