Files
octodocker_deploy/plugins.sh
paukstelis 5a7cde9a00 Development (#105)
* clean up with some redirects

* plugins from user, get better camera info

* readme, version
2023-07-18 16:55:27 -04:00

41 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
install_plugin() {
echo "Installing $plugin...."
sudo -u $user $OCTOPIP install "$plugin_path"
}
plugin_menu() {
echo
echo
get_settings
PS3="${green}Select recommended plugins to install: ${white}"
readarray -t plugins < <(cat $SCRIPTDIR/plugins_list | sed -n -e 's/^plugin:\(.*\) path:.*/\1/p')
plugins+=("All")
plugins+=("Quit")
select plugin in "${plugins[@]}"
do
if [ "$plugin" == Quit ]; then
break
fi
#some special thing to do if All Recommended
if [ "$plugin" == All ]; then
for plugin in "${plugins[@]}"; do
plugin_path=$(cat $SCRIPTDIR/plugins_list | sed -n -e "s/^plugin:$plugin path:\([[:graph:]]*\)/\1/p")
if [ -n "$plugin_path" ]; then
install_plugin $plugin $plugin_path
fi
done
break
fi
#install single plugin
#get plugin path
plugin_path=$(cat $SCRIPTDIR/plugins_list | sed -n -e "s/^plugin:$plugin path:\([[:graph:]]*\)/\1/p")
install_plugin
done
}