File: install-plugins.sh

package info (click to toggle)
librime 1.6.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,252 kB
  • sloc: cpp: 30,416; ansic: 2,510; javascript: 443; sh: 116; makefile: 70
file content (17 lines) | stat: -rwxr-xr-x 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

cd "$(dirname "$0")"

for slug in "$@"
do
    plugin_project="${slug##*/}"
    plugin_dir="plugins/${plugin_project#librime-}"
    if [[ -d "${plugin_dir}" ]]
    then
        echo "Updating plugin: ${plugin_dir}"
        git -C "${plugin_dir}" checkout master
        git -C "${plugin_dir}" pull
    else
        git clone --depth 1 "https://github.com/${slug}.git" "${plugin_dir}"
    fi
done