Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more error logging #116

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions patcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions wrappers/ffmpeg.sh
Original file line number Diff line number Diff line change
@@ -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; }

#########################
Expand All @@ -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; }

#########################
Expand Down
4 changes: 2 additions & 2 deletions wrappers/gst-inspect-1.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

#########################
Expand Down
4 changes: 2 additions & 2 deletions wrappers/gst-launch-1.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

#########################
Expand Down