fix output brainfarts from plugin installation

This commit is contained in:
ronivay
2020-03-17 10:52:14 +02:00
parent 89d588171b
commit 9b5b4a401d

View File

@@ -241,26 +241,21 @@ function InstallXOPlugins {
if [[ "$PLUGINS" == "all" ]]; then if [[ "$PLUGINS" == "all" ]]; then
echo echo
echo -ne "${PROGRESS} Installing all available plugins as defined in PLUGINS variable" echo -ne "${PROGRESS} Installing plugins"
find "$INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/" -maxdepth 1 -mindepth 1 -not -name "xo-server" -not -name "xo-web" -not -name "xo-server-cloud" -exec ln -sn {} "$INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/node_modules/" \; find "$INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/" -maxdepth 1 -mindepth 1 -not -name "xo-server" -not -name "xo-web" -not -name "xo-server-cloud" -exec ln -sn {} "$INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/node_modules/" \;
echo -e "\r${OK} Installing all available plugins as defined in PLUGINS variable"
else else
echo echo
echo -ne "${PROGRESS} Installing plugins defined in PLUGINS variable" echo -ne "${PROGRESS} Installing plugins"
local PLUGINSARRAY=($(echo "$PLUGINS" | tr ',' ' ')) local PLUGINSARRAY=($(echo "$PLUGINS" | tr ',' ' '))
for x in "${PLUGINSARRAY[@]}"; do for x in "${PLUGINSARRAY[@]}"; do
if [[ $(find $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages -type d -name "$x") ]]; then if [[ $(find $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages -type d -name "$x") ]]; then
ln -sn $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/$x $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/node_modules/ ln -sn $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/$x $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/node_modules/
echo -e "\r${OK} Installing plugins defined in PLUGINS variable"
else
echo -e "\r${FAIL} Installing plugins defined in PLUGINS variable"
echo -e " ${INFO} No $x plugin found from xen-orchestra packages, skipping"
continue
fi fi
done done
fi fi
cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn >/dev/null && yarn build >/dev/null cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn >/dev/null && yarn build >/dev/null
echo -e "\r${OK} Installing plugins"
else else
echo echo
echo -e "${INFO} No plugins to install" echo -e "${INFO} No plugins to install"