aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorjakob.stendahl <jakob.stendahl@infomedia.dk>2022-12-18 00:05:50 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2022-12-18 00:05:50 +0100
commit2c8063a1697ce4c737a2296b8d6385c9cf761f07 (patch)
treeb46312848930f3f2e590f94c61587902eade3d54 /bin
parent1e588718a855ae2871a8841f6c6e621f49795454 (diff)
downloadLuxcena-Neo-2c8063a1697ce4c737a2296b8d6385c9cf761f07.tar.gz
Luxcena-Neo-2c8063a1697ce4c737a2296b8d6385c9cf761f07.zip
Make the updater work properly
Diffstat (limited to 'bin')
-rwxr-xr-xbin/install.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/install.sh b/bin/install.sh
index e9bd1aa..2563ab2 100755
--- a/bin/install.sh
+++ b/bin/install.sh
@@ -96,7 +96,7 @@ function execCommand() {
TPUT cuf $(tput cols)
printf "\n"
if [ $# -eq 1 ] || [ $2 -eq "0" ]; then
- commandError $1
+ commandError $log
fi
fi
rm $log
@@ -153,10 +153,12 @@ TARBALL_URL=$(echo "$REPOINFO" | jq '.assets[0].browser_download_url')
execCommand "runuser -l $username -c \"curl -s -L -o $INSTALLDIR/$TARBALL_NAME $TARBALL_URL\""
header "Install luxcena-neo"
-execCommand "runuser -l $username -c \"export NODE_ENV=production; npm --prefix $INSTALLDIR/luxcena-neo/ install $INSTALLDIR/$TARBALL_NAME \""
+execCommand "runuser -l $username -c \"export NODE_ENV=production; npm --prefix $INSTALLDIR/luxcena-neo-tmp/ install $INSTALLDIR/$TARBALL_NAME \""
+execCommand "runuser -l $username -c \"mv $INSTALLDIR/luxcena-neo-tmp/node_modules/luxcena-neo/ $INSTALLDIR/luxcena-neo\""
execCommand "runuser -l $username -c \"rm $INSTALLDIR/$TARBALL_NAME\""
+execCommand "runuser -l $username -c \"rm -r $INSTALLDIR/luxcena-neo-tmp\""
# Installation is done!
printf '\n\e[5m%s\e[0m\n' "🎉Luxcena-Neo is now installed🎉"
-echo "Run 'sudo $INSTALLDIR/luxcena-neo/node_modules/luxcena-neo/bin/luxcena-neo.sh'"
+echo "Run 'sudo $INSTALLDIR/luxcena-neo/bin/luxcena-neo.sh'"
TPUT cnorm