Merge remote-tracking branch 'origin/master' into subpixel-font-positioning-fix
This commit is contained in:
+13
-2
@@ -21,7 +21,7 @@ while [[ "$#" -gt 0 ]]; do
|
||||
;;
|
||||
-plugin=*)
|
||||
# should be like -plugin=franko/lite-plugins/master/plugins/autowrap.lua
|
||||
plugins+=("$(github_raw_content "${1#-plugin=}")")
|
||||
plugins+=("${1#-plugin=}")
|
||||
;;
|
||||
-global)
|
||||
option_global=on
|
||||
@@ -91,9 +91,20 @@ run_lite () {
|
||||
fi
|
||||
}
|
||||
|
||||
github_raw_content () {
|
||||
echo "https://raw.githubusercontent.com/$1"
|
||||
}
|
||||
|
||||
fetch_plugins () {
|
||||
for name in "$@"; do
|
||||
curl --insecure -L "$name" -o "$datadir/plugins/${name##*/}"
|
||||
local url="$(github_raw_content "$name")"
|
||||
local modname="${url##*/}"
|
||||
if [ "$modname" == init.lua ]; then
|
||||
local m1="${name#*/}"
|
||||
modname="${m1%%/*}.lua"
|
||||
fi
|
||||
echo "installed $name as $modname from $url"
|
||||
curl --insecure -L "$url" -o "$datadir/plugins/${modname}"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user