From 996207125044f0de49a428bb7b3f17451b17410a Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Sat, 25 Apr 2026 20:44:59 -0500 Subject: [PATCH] update get_crop install install_deps --- lib/ffmpeg.sh | 4 ++-- lib/install_deps.sh | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/ffmpeg.sh b/lib/ffmpeg.sh index be1855a..255f293 100644 --- a/lib/ffmpeg.sh +++ b/lib/ffmpeg.sh @@ -51,8 +51,8 @@ get_crop() { duration="$(get_duration "${file}")" || return 1 # don't care about decimal points IFS='.' read -r duration _ <<<"${duration}" - # get crop value for first half of input - local timeEnc=$((duration / 20)) + # get crop value for first tenth of input + local timeEnc=$((duration / 10)) ffmpeg \ -y \ -hide_banner \ diff --git a/lib/install_deps.sh b/lib/install_deps.sh index e454e26..e6c509d 100644 --- a/lib/install_deps.sh +++ b/lib/install_deps.sh @@ -170,15 +170,16 @@ check_for_req_pkgs() { if missing_cmd rustup; then echo_warn "installing rustup" curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - # shellcheck disable=SC2016 - grep -q 'source "${HOME}/.cargo/env"' "${HOME}/.bashrc" || - echo 'source "${HOME}/.cargo/env"' >>"${HOME}/.bashrc" - # shellcheck disable=SC1091 + fi + if missing_cmd cargo; then source "${HOME}/.bashrc" fi fi - has_cmd cargo-cbuild || echo_if_fail cargo install cargo-c || return 1 + if ! has_cmd cargo-cbuild; then + echo_info "installing cargo-c" + echo_if_fail cargo install cargo-c || return 1 + fi echo_pass "cargo-c is installed" echo_pass "all required packages installed"