Merge pull request #146 from joshuaboniface/debian-packaging
Add build script for Debian packages via Docker
This commit is contained in:
commit
8adeacb3a0
22
build-deb.sh
Executable file
22
build-deb.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Build a Jellyfin .deb file with Docker on Linux
|
||||
# Places the output .deb file in the parent directory
|
||||
|
||||
set -o xtrace
|
||||
set -o nounset
|
||||
|
||||
package_temporary_dir="`mktemp -d`"
|
||||
current_user="`whoami`"
|
||||
image_name="jellyfin-debuild"
|
||||
|
||||
cleanup() {
|
||||
docker image rm $image_name --force
|
||||
test -d "$package_temporary_dir" && rm -r "$package_temporary_dir"
|
||||
}
|
||||
trap cleanup EXIT INT
|
||||
|
||||
docker build . -t "$image_name" -f ./Dockerfile.debian_package || exit 1
|
||||
docker run --rm -v "$package_temporary_dir:/temp" "$image_name" cp -r /dist /temp/ || exit 1
|
||||
sudo chown -R "$current_user" "$package_temporary_dir" || exit 1
|
||||
mv "$package_temporary_dir"/dist/*.deb ../ || exit 1
|
Loading…
Reference in New Issue
Block a user