Making a real good install.sh

This commit is contained in:
Zoe Roux 2020-01-13 00:11:08 +01:00
parent 0f4ab5fe9d
commit 126dff2fec
3 changed files with 14 additions and 1 deletions

View File

@ -40,6 +40,10 @@
<EmbeddedResource Include="libtranscoder.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="kyoo.sh" />
<EmbeddedResource Include="kyoo.sh">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">

11
install.sh Normal file → Executable file
View File

@ -1,8 +1,17 @@
#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "The script must be run as root since it create an user for kyoo and install the app inside the /opt folder."
exit
fi
git clone https://github.com/AnonymusRaccoon/Kyoo --recurse
cd Kyoo
git pull --recurse
chmod +x build.sh
./build.sh
dotnet publish -c Release -o /opt/kyoo Kyoo/Kyoo.csproj
dotnet publish -c Release -o /opt/kyoo Kyoo/Kyoo.csproj
useradd -rU kyoo
chown -R kyoo /opt/kyoo
chgrp -R kyoo /opt/kyoo
chmod +x /opt/kyoo/kyoo.sh