rdp / ffmpeg-windows-build-helpers

Helper script for cross compiling some media tools for windows, like customizable ffmpeg.exe (with or without non-free components, etc), and some other bonuses like mplayer, mp4box, mxf, etc.
GNU General Public License v3.0
1.07k stars 409 forks source link

Error pathspec origin/master #731

Open kadubsb opened 3 months ago

kadubsb commented 3 months ago

Hello, I'm having difficulty finalizing the ffmpeg compilation because it shows an error in the pathspec 'origin/master' as shown in the attached screen, could anyone help me in this case?

Error Compilation

Andre0be commented 3 months ago

Here the same problem. Lubuntu 23.10

Any idea?

Iansa9 commented 3 months ago

Changing build_libopus to this fixed it for me:

build_libopus() {
  do_git_checkout https://github.com/xiph/opus.git opus_git origin/main
  cd opus_git
    generic_configure "--disable-doc --disable-extra-programs --disable-stack-protector"
    do_make_and_make_install
  cd ..
}
pjt-15e commented 3 months ago

I came to this after finding my own solution, and agree that lansa9's solution above works too.

The change I made locally was within "do_git_checkout()" where I check for the git branches available, for either "origin/master" or "origin/main" (as found in libopus).

So

if [[ -z $desired_branch ]]; then
    desired_branch="origin/master"
fi

becomes

if [[ -z $desired_branch ]]; then
    # Check for either "origin/main" or "origin/master".
    if [ $(git show-ref | grep -e origin\/main$ -c) = 1 ]; then
        desired_branch="origin/main"
    elif [ $(git show-ref | grep -e origin\/master$ -c) = 1 ]; then
        desired_branch="origin/master"
    else
        echo "No valid git branch!"
        exit 1
    fi
fi
echo "doing git checkout $desired_branch"