tidy up plugin installation function
This commit is contained in:
@@ -370,16 +370,19 @@ function InstallXOPlugins {
|
|||||||
|
|
||||||
trap ErrorHandling ERR INT
|
trap ErrorHandling ERR INT
|
||||||
|
|
||||||
if [[ -n "$PLUGINS" ]] && [[ "$PLUGINS" != "none" ]]; then
|
if [[ -z "$PLUGINS" ]] || [[ "$PLUGINS" == "none" ]]; then
|
||||||
|
echo
|
||||||
|
printinfo "No plugins to install"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$PLUGINS" == "all" ]]; then
|
|
||||||
echo
|
echo
|
||||||
printprog "Installing plugins"
|
printprog "Installing plugins"
|
||||||
|
|
||||||
|
if [[ "$PLUGINS" == "all" ]]; then
|
||||||
cmdlog "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/\""
|
cmdlog "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/\""
|
||||||
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/" \; >>$LOGFILE 2>&1
|
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/" \; >>$LOGFILE 2>&1
|
||||||
else
|
else
|
||||||
echo
|
|
||||||
printprog "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
|
||||||
@@ -392,10 +395,6 @@ function InstallXOPlugins {
|
|||||||
cmdlog "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn && yarn build"
|
cmdlog "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn && yarn build"
|
||||||
cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn >>$LOGFILE 2>&1 && yarn build >>$LOGFILE 2>&1 || false
|
cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn >>$LOGFILE 2>&1 && yarn build >>$LOGFILE 2>&1 || false
|
||||||
printok "Installing plugins"
|
printok "Installing plugins"
|
||||||
else
|
|
||||||
echo
|
|
||||||
printinfo "No plugins to install"
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user