summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-05-26 00:34:19 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-05-26 00:48:29 (EDT)
commit72562b1c6304f8513f09baa5674bbb83d1edb6c6 (patch)
tree0709542d4229f140bd057feedc43da45ec0ab84f
parent48b4335689daabdbf4e1ae286b2d4ccbd5ea1c02 (diff)
bootstrap-prepare.sh: Re-enable packages from Git.
Also support fetching non-master branches.
-rwxr-xr-xbootstrap-prepare.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/bootstrap-prepare.sh b/bootstrap-prepare.sh
index 1ff85c1..46d108c 100755
--- a/bootstrap-prepare.sh
+++ b/bootstrap-prepare.sh
@@ -39,6 +39,7 @@ main()
EOF
prepare_file_system_fake
+ prepare_packages_from_git
prepare_packages
prepare_file_system
}
@@ -70,25 +71,24 @@ prepare_file_system_fake()
sudo ln -sf opkhelper /usr/local/share/opkbuild/helpers/opkhelper-3.0
}
-: <<'EOF'
prepare_packages_from_git()
{
- local repo patch
+ local repo branch patch
[ -d pkg ] || mkdir pkg
cd pkg
- for repo in $(cat "${SCRIPT_DIR}/bootstrap-pkgs-git.txt"); do
+ while read repo branch; do
if [ -f "${repo##*/}_"*'_src_all.changes' ]; then
continue
fi
log 'Preparing package %s...' "${repo##*/}"
if [ ! -d "${repo##*/}/.git" ]; then
- git clone --depth 1 \
+ git clone --depth 1 --branch "${branch}" \
"git://git.proteanos.com/pkg/${repo}.git"
fi
cd "${repo##*/}"
- git pull origin master
+ git pull origin "${branch}"
if [ -d "${SCRIPT_DIR}/patches/${repo##*/}" ]; then
printf 'Patching package %s...\n' "${repo##*/%/}"
for patch in "${SCRIPT_DIR}/patches/${repo##*/}/"*; do
@@ -112,11 +112,12 @@ prepare_packages_from_git()
opkbuild -SC
rm -Rf tmp
cd ..
- done
+ done <"${SCRIPT_DIR}/bootstrap-pkgs-git.txt"
cd ..
}
+: <<'EOF'
prepare_packages_from_ftp()
{
local pkg src_opk path