2019-01-12 00:49:46 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
source ../common.build.sh
|
|
|
|
|
|
|
|
VERSION=`get_version ../..`
|
|
|
|
|
2019-01-23 20:14:10 +00:00
|
|
|
package_temporary_dir="`pwd`/pkg-dist-tmp"
|
|
|
|
pkg_src_dir="`pwd`/pkg-src"
|
|
|
|
image_name="jellyfin-rpmbuild"
|
|
|
|
docker_sudo=""
|
2019-01-24 14:24:04 +00:00
|
|
|
if ! $(id -Gn | grep -q 'docker') && [ ! ${EUID:-1000} -eq 0 ] && [ ! $USER == "root" ]; then
|
2019-01-23 20:14:10 +00:00
|
|
|
docker_sudo=sudo
|
|
|
|
fi
|
|
|
|
|
|
|
|
$docker_sudo docker image rm $image_name --force
|
|
|
|
rm -rf "$package_temporary_dir"
|
|
|
|
rm -rf "$pkg_src_dir/jellyfin-${VERSION}.tar.gz"
|