mirror of
https://github.com/scummvm/dockerized-bb.git
synced 2026-05-21 05:40:49 +00:00
COMMON: Add do_git_fetch function to common functions
This commit is contained in:
@@ -52,6 +52,17 @@ __do_http_fetch () {
|
||||
do_patch
|
||||
}
|
||||
|
||||
__do_git_fetch () {
|
||||
if [ -d "$1"*/ ]; then
|
||||
rm -rf "$1"*/
|
||||
fi
|
||||
git clone "$2" "$1"
|
||||
cd "$1"*/
|
||||
git checkout "$3"
|
||||
git submodule update --init
|
||||
do_patch
|
||||
}
|
||||
|
||||
__do_configure () {
|
||||
./configure --prefix=$PREFIX --host=$HOST --disable-shared "$@"
|
||||
}
|
||||
@@ -82,7 +93,7 @@ __error () {
|
||||
# but still use base function (Poor man's inheritance)
|
||||
# Aliases are expanded at definition time so that's not the good way
|
||||
for f in do_make_bdir do_clean_bdir do_patch do_pkg_fetch do_http_fetch \
|
||||
do_configure do_cmake do_make log error; do
|
||||
do_git_fetch do_configure do_cmake do_make log error; do
|
||||
eval "$f () { __$f \"\$@\"; }"
|
||||
done
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
cmake \
|
||||
debhelper \
|
||||
dpkg-dev \
|
||||
git \
|
||||
gnupg \
|
||||
libtool \
|
||||
make \
|
||||
|
||||
@@ -12,12 +12,9 @@ FROM toolchains/devkitarm
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
g++ \
|
||||
git \
|
||||
zip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY functions-platform.sh lib-helpers/
|
||||
|
||||
# We need to compile tools before setting environment for all other packages
|
||||
# We do this now !
|
||||
local_package(bannertool)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
do_git_fetch () {
|
||||
if [ -d "$1"*/ ]; then
|
||||
rm -rf "$1"*/
|
||||
fi
|
||||
git clone "$2" "$1"
|
||||
cd "$1"*/
|
||||
git checkout "$3"
|
||||
git submodule update --init
|
||||
do_patch
|
||||
}
|
||||
Reference in New Issue
Block a user