From 72562b1c6304f8513f09baa5674bbb83d1edb6c6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 26 May 2014 00:34:19 -0400 Subject: bootstrap-prepare.sh: Re-enable packages from Git. Also support fetching non-master branches. --- 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 -- cgit v0.9.1