Avoid cloning entire repos
This commit is contained in:
parent
cf486fe562
commit
b4bbce3020
20 changed files with 29 additions and 36 deletions
|
@ -9,3 +9,4 @@ RUN \
|
|||
apt-get -y clean
|
||||
|
||||
ADD run_stage.sh /usr/bin/run_stage
|
||||
ADD git-mini-clone.sh /usr/bin/git-mini-clone
|
||||
|
|
10
images/base/git-mini-clone.sh
Executable file
10
images/base/git-mini-clone.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -xe
|
||||
REPO="$1"
|
||||
REF="$2"
|
||||
DEST="$3"
|
||||
git init "$DEST"
|
||||
git -C "$DEST" remote add origin "$REPO"
|
||||
git -C "$DEST" fetch --depth=1 origin "$REF"
|
||||
git -C "$DEST" config advice.detachedHead false
|
||||
git -C "$DEST" checkout FETCH_HEAD
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$FRIBIDI_REPO" fribidi || return -1
|
||||
git-mini-clone "$FRIBIDI_REPO" "$FRIBIDI_COMMIT" fribidi
|
||||
cd fribidi
|
||||
git checkout "$FRIBIDI_COMMIT" || return -1
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$OGG_REPO" ogg || return -1
|
||||
git-mini-clone "$OGG_REPO" "$OGG_COMMIT" ogg
|
||||
cd ogg
|
||||
git checkout "$OGG_COMMIT" || return -1
|
||||
|
||||
./autogen.sh || return -1
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$OPENSSL_REPO" openssl || return -1
|
||||
git-mini-clone "$OPENSSL_REPO" "$OPENSSL_COMMIT" openssl
|
||||
cd openssl
|
||||
git checkout "$OPENSSL_COMMIT" || return -1
|
||||
|
||||
local myconf=(
|
||||
threads
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$HARFBUZZ_REPO" harfbuzz || return -1
|
||||
git-mini-clone "$HARFBUZZ_REPO" "$HARFBUZZ_COMMIT" harfbuzz
|
||||
cd harfbuzz
|
||||
git checkout "$HARFBUZZ_COMMIT" || return -1
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$VORBIS_REPO" vorbis || return -1
|
||||
git-mini-clone "$VORBIS_REPO" "$VORBIS_COMMIT" vorbis
|
||||
cd vorbis
|
||||
git checkout "$VORBIS_COMMIT" || return -1
|
||||
|
||||
./autogen.sh || return -1
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$AMF_REPO" amf || return -1
|
||||
git-mini-clone "$AMF_REPO" "$AMF_COMMIT" amf
|
||||
cd amf
|
||||
git checkout "$AMF_COMMIT" || return -1
|
||||
|
||||
mkdir -p "$FFBUILD_PREFIX"/include
|
||||
mv amf/public/include "$FFBUILD_PREFIX"/include/AMF || return -1
|
||||
|
|
|
@ -14,9 +14,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$AVISYNTH_REPO" avisynth || return -1
|
||||
git-mini-clone "$AVISYNTH_REPO" "$AVISYNTH_COMMIT" avisynth
|
||||
cd avisynth
|
||||
git checkout "$AVISYNTH_COMMIT" || return -1
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$DAV1D_REPO" dav1d || return -1
|
||||
git-mini-clone "$DAV1D_REPO" "$DAV1D_COMMIT" dav1d
|
||||
cd dav1d
|
||||
git checkout "$DAV1D_COMMIT" || return -1
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$FFNVCODEC_REPO" ffnvcodec || return -1
|
||||
git-mini-clone "$FFNVCODEC_REPO" "$FFNVCODEC_COMMIT" ffnvcodec
|
||||
pushd ffnvcodec
|
||||
git checkout "$FFNVCODEC_COMMIT" || return -1
|
||||
|
||||
make PREFIX="$FFBUILD_PREFIX" install || return -1
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$ASS_REPO" ass || return -1
|
||||
git-mini-clone "$ASS_REPO" "$ASS_COMMIT" ass
|
||||
cd ass
|
||||
git checkout "$ASS_COMMIT" || return -1
|
||||
|
||||
./autogen.sh || return -1
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$OPUS_REPO" opus || return -1
|
||||
git-mini-clone "$OPUS_REPO" "$OPUS_COMMIT" opus
|
||||
cd opus
|
||||
git checkout "$OPUS_COMMIT" || return -1
|
||||
|
||||
./autogen.sh || return -1
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$THEORA_REPO" theora || return -1
|
||||
git-mini-clone "$THEORA_REPO" "$THEORA_COMMIT" theora
|
||||
cd theora
|
||||
git checkout "$THEORA_COMMIT" || return -1
|
||||
|
||||
./autogen.sh || return -1
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$LIBVPX_REPO" libvpx || return -1
|
||||
git-mini-clone "$LIBVPX_REPO" "$LIBVPX_COMMIT" libvpx
|
||||
cd libvpx
|
||||
git checkout "$LIBVPX_COMMIT" || return -1
|
||||
|
||||
local myconf=(
|
||||
--disable-shared
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$MFX_REPO" mfx || return -1
|
||||
git-mini-clone "$MFX_REPO" "$MFX_COMMIT" mfx
|
||||
cd mfx
|
||||
git checkout "$MFX_COMMIT" || return -1
|
||||
|
||||
autoreconf -i || return -1
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$SRT_REPO" srt || return -1
|
||||
git-mini-clone "$SRT_REPO" "$SRT_COMMIT" srt
|
||||
cd srt
|
||||
git checkout "$SRT_COMMIT" || return -1
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
|
|
|
@ -14,9 +14,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$X264_REPO" x264 || return -1
|
||||
git-mini-clone "$X264_REPO" "$X264_COMMIT" x264
|
||||
pushd x264
|
||||
git checkout "$X264_COMMIT" || return -1
|
||||
|
||||
local myconf=(
|
||||
--disable-cli
|
||||
|
|
|
@ -14,9 +14,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$X265_REPO" x265 || return -1
|
||||
git-mini-clone "$X265_REPO" "$X265_COMMIT" x265
|
||||
cd x265
|
||||
git checkout "$X265_COMMIT" || return -1
|
||||
|
||||
mkdir 8bit 10bit 12bit
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ ffbuild_dockerstage() {
|
|||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$ZIMG_REPO" zimg || return -1
|
||||
git-mini-clone "$ZIMG_REPO" "$ZIMG_COMMIT" zimg
|
||||
cd zimg
|
||||
git checkout "$ZIMG_COMMIT" || return -1
|
||||
|
||||
./autogen.sh || return -1
|
||||
|
||||
|
|
Loading…
Reference in a new issue