Sudo fix for debian and fedora.

This commit is contained in:
Erwin de Haan 2019-01-13 23:34:40 +01:00
parent ae0732136f
commit ca320ba7ac
2 changed files with 5 additions and 10 deletions

View File

@ -25,9 +25,7 @@ docker build ../.. -t "$image_name" -f ./Dockerfile --build-arg SOURCEDIR="/jell
mkdir -p "$package_temporary_dir"
mkdir -p "$output_dir"
docker run --rm -v "$package_temporary_dir:/temp" "$image_name" sh -c 'find / -maxdepth 1 -type f -name "jellyfin*" -exec mv {} /temp \;'
chown -R "$current_user" "$package_temporary_dir"
if [ $? -ne 0 ]; then
# Some platforms need this to chown the file properly. (Platforms with native docker, not just the client)
sudo chown -R "$current_user" "$package_temporary_dir"
fi
chown -R "$current_user" "$package_temporary_dir" \
|| sudo chown -R "$current_user" "$package_temporary_dir"
mv "$package_temporary_dir"/* "$output_dir"

View File

@ -78,9 +78,6 @@ fi
docker build ../.. -t "$image_name" -f ./Dockerfile
mkdir -p "$output_dir"
docker run --rm -v "$package_temporary_dir:/temp" "$image_name" sh -c 'find /build/rpmbuild -maxdepth 3 -type f -name "jellyfin*.rpm" -exec mv {} /temp \;'
chown -R "$current_user" "$package_temporary_dir"
if [ $? -ne 0 ]; then
# Some platforms need this to chown the file properly. (Platforms with native docker, not just the client)
sudo chown -R "$current_user" "$package_temporary_dir"
fi
chown -R "$current_user" "$package_temporary_dir" \
|| sudo chown -R "$current_user" "$package_temporary_dir"
mv "$package_temporary_dir"/*.rpm "$output_dir"