diff options
| author | Francesco Abbate <francesco.bbt@gmail.com> | 2021-03-06 15:39:30 +0100 |
|---|---|---|
| committer | Francesco Abbate <francesco.bbt@gmail.com> | 2021-03-06 15:39:30 +0100 |
| commit | 913549a7b6f275dc39f622f0821c710288b51f41 (patch) | |
| tree | 3d6e7473a20aca87f44056b0a5e04e172750c173 /dev-utils | |
| parent | 6909fd9a604e529c906d901a980c938f78273474 (diff) | |
| download | lite-xl-913549a7b6f275dc39f622f0821c710288b51f41.tar.gz lite-xl-913549a7b6f275dc39f622f0821c710288b51f41.zip | |
Add run-local option to run with a thirdy-part plugin
Diffstat (limited to 'dev-utils')
| -rwxr-xr-x | dev-utils/run-local | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dev-utils/run-local b/dev-utils/run-local index e0d6a059..ff6a9754 100755 --- a/dev-utils/run-local +++ b/dev-utils/run-local @@ -2,9 +2,15 @@ set -o errexit +# accept argument in the form +github_raw_content () { + echo "https://raw.githubusercontent.com/$1" +} + option_portable=off option_copy=on pargs=() +plugins=() while [[ "$#" -gt 0 ]]; do case $1 in -portable) @@ -13,6 +19,10 @@ while [[ "$#" -gt 0 ]]; do -keep) option_copy=off ;; + -plugin=*) + # should be like -plugin=franko/lite-plugins/master/plugins/autowrap.lua + plugins+=("$(github_raw_content "${1#-plugin=}")") + ;; -global) option_global=on ;; @@ -81,8 +91,15 @@ run_lite () { fi } +fetch_plugins () { + for name in "$@"; do + curl --insecure -L "$name" -o "$datadir/plugins/${name##*/}" + done +} + if [ $option_copy == on ]; then build_lite copy_lite_build fi +fetch_plugins "${plugins[@]}" run_lite |
