Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

[INFRASTRUCTURE] Linux/OSX improvements for build.sh

Christoffer Green438239dc9a87
diff --git a/build.sh b/build.sh
index 9aa3b0239..d2ff49006 100755
--- a/build.sh
+++ b/build.sh
@@ -1,8 +1,20 @@
-#! /bin/bash
+#! /bin/bash
set -e
outputFolder='_output'
+CheckRequirements()
+{
+ if ! command -v npm &> /dev/null
+ then
+ echo "Warning!!! npm not found, it is required for building Kavita!"
+ fi
+ if ! command -v dotnet &> /dev/null
+ then
+ echo "Warning!!! dotnet not found, it is required for building Kavita!"
+ fi
+}
+
ProgressStart()
{
echo "Start '$1'"
@@ -55,7 +67,8 @@ BuildUI()
echo 'Building UI'
npm run prod
echo 'Copying back to Kavita wwwroot'
- cp -r dist/* ../../API/wwwroot
+ mkdir -p ../../API/wwwroot
+ cp -R dist/* ../../API/wwwroot
cd ../../ || exit
ProgressEnd 'Building UI'
}
@@ -75,7 +88,7 @@ Package()
dotnet publish -c Release --self-contained --runtime $runtime -o "$lOutputFolder" --framework $framework
echo "Recopying wwwroot due to bug"
- cp -r ./wwwroot/* $lOutputFolder/wwwroot
+ cp -R ./wwwroot/* $lOutputFolder/wwwroot
echo "Copying Install information"
cp ../INSTALL.txt "$lOutputFolder"/README.txt
@@ -101,6 +114,7 @@ Package()
RID="$1"
+CheckRequirements
BuildUI
Build