mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-27 14:19:38 +00:00
Linux builder bash script
This commit is contained in:
parent
d95689a078
commit
73ef4cd4b5
4 changed files with 38 additions and 10 deletions
0
build/debian/etc/default/.gitkeep
Normal file
0
build/debian/etc/default/.gitkeep
Normal file
|
|
@ -1,5 +0,0 @@
|
|||
AUDIOBOOK_PATH=/usr/share/audiobookshelf/audiobooks
|
||||
METADATA_PATH=/usr/share/audiobookshelf/metadata
|
||||
CONFIG_PATH=/usr/share/audiobookshelf/config
|
||||
FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg
|
||||
PORT=1337
|
||||
37
build/linuxpackager
Normal file
37
build/linuxpackager
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
cd "$SCRIPT_DIR/.."
|
||||
|
||||
# Get package version without double quotes
|
||||
VERSION="$( eval echo $( jq '.version' package.json) )"
|
||||
OUTPUT_FILE="audiobookshelf_${VERSION}_amd64"
|
||||
|
||||
echo ">>> Building Client"
|
||||
echo "--------------------"
|
||||
|
||||
cd client
|
||||
rm -rf node_modules
|
||||
npm ci --unsafe-perm=true --allow-root
|
||||
npm run generate
|
||||
cd ..
|
||||
|
||||
echo ">>> Building Server"
|
||||
echo "--------------------"
|
||||
|
||||
rm -rf node_modules
|
||||
npm ci --unsafe-perm=true --allow-root
|
||||
|
||||
echo ">>> Packaging"
|
||||
echo "--------------------"
|
||||
|
||||
pkg -t node12-linux-x64 -o build/debian/usr/share/audiobookshelf/audiobookshelf .
|
||||
|
||||
fakeroot dpkg-deb --build build/debian
|
||||
|
||||
mv build/debian.deb "build/$OUTPUT_FILE"
|
||||
|
||||
echo "Finished! Filename: $OUTPUT_FILE"
|
||||
Loading…
Add table
Add a link
Reference in a new issue