diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2017-12-04 22:14:45 +0200 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2017-12-05 23:53:19 -0800 |
commit | 04d7bd6a19011c23939f8fec1a1839dd0a1d119f (patch) | |
tree | 045dc927dd2f9e86d7b3228059ce5220c3acc2da /update | |
parent | db21368c91ce789acab5fa0edd21c2c30525dbf3 (diff) | |
download | mpv-build-04d7bd6a19011c23939f8fec1a1839dd0a1d119f.tar.bz2 mpv-build-04d7bd6a19011c23939f8fec1a1839dd0a1d119f.tar.xz |
add use-<proj>-custom FOO for any commit/branch/tag
While it was possible before to build any branch of mpv/ffmpeg/etc by
just git checkout $whatever and then ./build, it got reset after
./rebuild or ./update etc.
Add use-mpv-custom and use-ffmpeg-custom which accept any
commit/branch/tag which will survive ./rebuild, ./update, etc.
This should make it slightly easier to build past versions of mpv.
While at it, also add use-libass-{master|custom}
Diffstat (limited to 'update')
-rwxr-xr-x | update | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -65,21 +65,24 @@ do_fixedref() ) } -# args: $1: project name, $2: release/master [,$3: non-empty to ignore the config file] +# args: $1: project name, $2: release/master/@foo [,$3: non-empty to ignore the config file] checkout() { - local arg="$2" + local branch="$2" if [ -z "$3" ] && [ -d config/ ] && [ -f config/branch-$1 ]; then - arg="$(cat config/branch-$1)" + branch="$(cat config/branch-$1)" fi - case "$arg" in + case "$branch" in master) do_gitmaster $1;; - *) do_releasetag $1;; + release) do_releasetag $1;; + @*) do_fixedref $1 "${branch#@}";; # everything after the '@' prefix + *) >&2 printf "%s\n" "Error: Don't know how to checkout '$branch'" + return 1 esac } -# fallback targets: release/master if no config file +# fallback targets: release/master/@foo if no config file checkout_ffmpeg=master #checkout_fribidi=release checkout_libass=master |