diff --git a/patcher.sh b/patcher.sh index f87c73e..99af9f0 100755 --- a/patcher.sh +++ b/patcher.sh @@ -203,7 +203,7 @@ patch() { download "$filename.sh" "$repo_base_url/$branch/wrappers/$filename.sh" "$vs_path/bin/$filename" chown root:VideoStation "$vs_path/bin/$filename" - chmod 750 "$vs_path/bin/$filename" + chmod 755 "$vs_path/bin/$filename" chmod u+s "$vs_path/bin/$filename" sed -i -e "s/@package_name@/VideoStation/" "$vs_path/bin/$filename" @@ -220,8 +220,7 @@ patch() { mv -n "$cp_bin_path/$filename" "$cp_bin_path/$filename.orig" download "$filename.sh" "$repo_base_url/$branch/wrappers/$target.sh" "$cp_bin_path/$filename" - chmod 750 "$cp_bin_path/$filename" - chmod u+s "$cp_bin_path/$filename" + chmod 755 "$cp_bin_path/$filename" sed -i -e "s/@package_name@/CodecPack/" "$cp_bin_path/$filename" fi @@ -251,6 +250,7 @@ patch() { mkdir "$cp_base_path/patch" download "CodecPack's patch_config.sh" "$repo_base_url/$branch/utils/patch_config.sh" "$cp_base_path/patch/patch_config.sh" download "CodecPack's patch_utils.sh" "$repo_base_url/$branch/utils/patch_utils.sh" "$cp_base_path/patch/patch_utils.sh" + chmod -R 755 "$cp_base_path/patch" info "Setting CodecPack's ffmpeg version to: ffmpeg$ffmpegversion" sed -i -e "s/@ffmpeg_version@/ffmpeg$ffmpegversion/" "$cp_base_path/patch/patch_config.sh" @@ -286,6 +286,7 @@ patch() { mkdir "$vs_base_path/patch" download "VideoStation's patch_config.sh" "$repo_base_url/$branch/utils/patch_config.sh" "$vs_base_path/patch/patch_config.sh" download "VideoStation's patch_utils.sh" "$repo_base_url/$branch/utils/patch_utils.sh" "$vs_base_path/patch/patch_utils.sh" + chmod -R 755 "$vs_base_path/patch" info "Setting ffmpeg version to: ffmpeg$ffmpegversion" sed -i -e "s/@ffmpeg_version@/ffmpeg$ffmpegversion/" "$vs_base_path/patch/patch_config.sh" diff --git a/wrappers/ffmpeg.sh b/wrappers/ffmpeg.sh index 0694fe3..65715cc 100644 --- a/wrappers/ffmpeg.sh +++ b/wrappers/ffmpeg.sh @@ -1,8 +1,8 @@ #!/bin/bash # shellcheck source=/utils/patch_utils.sh -source "/var/packages/VideoStation/patch/patch_utils.sh" 2> /dev/null || -source "/var/packages/CodecPack/patch/patch_utils.sh" 2> /dev/null || +source "/var/packages/VideoStation/patch/patch_utils.sh" 2> /tmp/ffmpeg-0.stderr.prev || +source "/var/packages/CodecPack/patch/patch_utils.sh" 2> /tmp/ffmpeg-0.stderr.prev || { echo "Cannot load patch_utils.sh" >> "/tmp/ffmpeg-0.stderr.prev" && echo "Cannot load patch_utils.sh" && exit 1; } ######################### @@ -22,8 +22,8 @@ args=() ######################### # shellcheck source=/utils/patch_config.sh -source "/var/packages/VideoStation/patch/patch_config.sh" 2> /dev/null || -source "/var/packages/CodecPack/patch/patch_config.sh" 2> /dev/null || +source "/var/packages/VideoStation/patch/patch_config.sh" 2> /tmp/ffmpeg-0.stderr.prev || +source "/var/packages/CodecPack/patch/patch_config.sh" 2> /tmp/ffmpeg-0.stderr.prev || { echo "Cannot load patch_config.sh" >> "/tmp/ffmpeg-0.stderr.prev" && echo "Cannot load patch_config.sh" && exit 1; } ######################### diff --git a/wrappers/gst-inspect-1.0.sh b/wrappers/gst-inspect-1.0.sh index 5702c76..cae2e24 100644 --- a/wrappers/gst-inspect-1.0.sh +++ b/wrappers/gst-inspect-1.0.sh @@ -3,8 +3,8 @@ export GST_DEBUG=1 #1: ERROR (Log fatal errors only). # shellcheck source=/utils/patch_utils.sh -source "/var/packages/VideoStation/patch/patch_utils.sh" 2> /dev/null || -source "/var/packages/CodecPack/patch/patch_utils.sh" 2> /dev/null || +source "/var/packages/VideoStation/patch/patch_utils.sh" 2> /tmp/gstinspect-0.stderr.prev || +source "/var/packages/CodecPack/patch/patch_utils.sh" 2> /tmp/gstinspect-0.stderr.prev || { echo "Cannot load patch_utils.sh" >> "/tmp/gstinspect-0.stderr.prev" && echo "Cannot load patch_utils.sh" && exit 1; } ######################### diff --git a/wrappers/gst-launch-1.0.sh b/wrappers/gst-launch-1.0.sh index 269f279..ff829d0 100644 --- a/wrappers/gst-launch-1.0.sh +++ b/wrappers/gst-launch-1.0.sh @@ -5,8 +5,8 @@ export LD_LIBRARY_PATH=/var/packages/@package_name@/target/lib/gstreamer/patch export GST_PLUGIN_PATH=/var/packages/@package_name@/target/lib/gstreamer/gstreamer-1.0/patch # shellcheck source=/utils/patch_utils.sh -source "/var/packages/VideoStation/patch/patch_utils.sh" 2> /dev/null || -source "/var/packages/CodecPack/patch/patch_utils.sh" 2> /dev/null || +source "/var/packages/VideoStation/patch/patch_utils.sh" 2> /tmp/gstlaunch-0.stderr.prev || +source "/var/packages/CodecPack/patch/patch_utils.sh" 2> /tmp/gstlaunch-0.stderr.prev || { echo "Cannot load patch_utils.sh" >> "/tmp/gstlaunch-0.stderr.prev" && echo "Cannot load patch_utils.sh" && exit 1; } #########################