Skip to content
Snippets Groups Projects
Commit 888eedb7 authored by Sebastian Fricke's avatar Sebastian Fricke
Browse files

build.sh: Move repository fetching into a separate step


In order to run build.sh, the user has to provide a configuration. As
preparation for creating a generic container image, move the
instructions to fetch git repositories into a script that can run
without a user-specific configuration.

Signed-off-by: default avatarSebastian Fricke <sebastian.fricke@collabora.com>
parent e1552a7d
No related branches found
No related tags found
No related merge requests found
...@@ -45,8 +45,6 @@ patches=0 ...@@ -45,8 +45,6 @@ patches=0
# For parallel builds use a fourth of the total number of CPUs # For parallel builds use a fourth of the total number of CPUs
p_cpus=$(($CPUS/4)) p_cpus=$(($CPUS/4))
smatch_git=git://repo.or.cz/smatch.git
while [ ! -z "$1" ]; do while [ ! -z "$1" ]; do
case "$1" in case "$1" in
-daily) -daily)
...@@ -205,17 +203,15 @@ if [ "$1" == "ccache-clean" ]; then ...@@ -205,17 +203,15 @@ if [ "$1" == "ccache-clean" ]; then
fi fi
if [ "$1" == "setup" ]; then if [ "$1" == "setup" ]; then
rm -rf $log_data/* $build_data/* if [ ! -d $build_data/media-git ]; then
echo '`media-git` folder missing, run prepare_build.sh first'
exit 1
fi
mkdir -p $build_data/trees mkdir -p $build_data/trees
cd $build_data/trees cd $build_data/trees
mkdir -p $architectures mkdir -p $architectures
cd $build_data
git clone git://linuxtv.org/v4l-utils.git
git clone git://linuxtv.org/edid-decode.git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git media-git
cd $build_data/media-git cd $build_data/media-git
git remote add media_tree git://linuxtv.org/media_tree.git
git remote add media_stage git://linuxtv.org/media_stage.git
git remote add main $myrepo git remote add main $myrepo
if [ -n "$mylocalrepo" ]; then if [ -n "$mylocalrepo" ]; then
git remote add local $mylocalrepo git remote add local $mylocalrepo
...@@ -362,7 +358,8 @@ cd $top ...@@ -362,7 +358,8 @@ cd $top
if [ $sparse == 1 -o $smatch == 1 -o ! -d $build_data/smatch ]; then if [ $sparse == 1 -o $smatch == 1 -o ! -d $build_data/smatch ]; then
if [ ! -d $build_data/smatch ]; then if [ ! -d $build_data/smatch ]; then
git clone $smatch_git echo 'Smatch missing, run prepare_build.sh first'
exit 1
fi fi
cd $build_data/smatch cd $build_data/smatch
git remote update git remote update
...@@ -394,7 +391,6 @@ if [ $use_ccache = "1" ]; then ...@@ -394,7 +391,6 @@ if [ $use_ccache = "1" ]; then
echo -n "ccache version: " >>$logdir/hashes echo -n "ccache version: " >>$logdir/hashes
/usr/bin/ccache --version | head -1 >>$logdir/hashes /usr/bin/ccache --version | head -1 >>$logdir/hashes
fi fi
echo "smatch/sparse repo: $smatch_git" >>$logdir/hashes
echo -n "smatch version: " >>$logdir/hashes echo -n "smatch version: " >>$logdir/hashes
$build_data/smatch/smatch --version >>$logdir/hashes $build_data/smatch/smatch --version >>$logdir/hashes
echo -n "sparse version: " >>$logdir/hashes echo -n "sparse version: " >>$logdir/hashes
......
#!/bin/bash
cd build-data
git clone git://linuxtv.org/v4l-utils.git
git clone git://linuxtv.org/edid-decode.git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git media-git
if [ ! -d smatch ]; then
git clone git://repo.or.cz/smatch.git
fi
cd build-data/media-git
git remote add media_tree git://linuxtv.org/media_tree.git
git remote add media_stage git://linuxtv.org/media_stage.git
cd ../..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment