From 81c784098c76f200df9c9ceb329ded3a10a74ee5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 1 Feb 2023 11:43:08 -0500 Subject: [PATCH] cros-cbuildbot: dead tool --- .bin/cros-cbuildbot | 103 -------------------------------------------- 1 file changed, 103 deletions(-) delete mode 100755 .bin/cros-cbuildbot diff --git a/.bin/cros-cbuildbot b/.bin/cros-cbuildbot deleted file mode 100755 index cdc6b43..0000000 --- a/.bin/cros-cbuildbot +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/bash - -set -e - -vexec() { - local i fmt - for (( i = 1; i <= $#; ++i )) ; do - case ${!i} in - *" "*) fmt="'%s'";; - *) fmt="%s";; - esac - printf "${fmt}" "${!i}" - if [[ $i -lt $# ]] ; then - printf ' ' - else - echo - fi - done - exec "$@" -} - -cd ~/chromiumos - -d=/usr/local/google/home/vapier -if [[ ! -d ${d} ]] ; then - exit 1 -fi - -if [[ -z ${UNSHARE} ]] ; then - if type -P unshare >&/dev/null ; then - exec sudo unshare -m -- sudo -u ${USER} \ - UNSHARE=true PATH="${PATH}" "$0" "$@" - fi - unset UNSHARE -fi - -d+="/trybot" -mkdir -p "${d}" -if mount | grep -qs $d ; then - echo "mounts found in $d" - exit 1 -fi -if [[ -L $d ]] ; then - rd=$(readlink $d) - if mount | grep -qs $rd ; then - echo "mounts found in $rd" - exit 1 - fi -fi - -if [[ $1 == "--noclean" ]] ; then - shift -elif [[ " $* " != *" --remote "* ]] ; then - echo "Cleaning ${d}" - pushd "${d}" >/dev/null - clean=( - built-sdk.tbz2 -# chroot - new-sdk-chroot - sdks - src/build - test_results.tgz - trybot_archive - ) - sudo rm -rf "${clean[@]}" -# [[ -L .cache ]] && rm -f .cache || : -# mkdir -p .cache -# sudo mount --bind -n ~/chromiumos/.cache .cache - popd >/dev/null -fi - -# find all the buildbot branches -echo "Looking up repo branches" -repos=$(r b | cut -b4- | awk '$1 == "bb" { - # Single repo output: - # bb | in src/third_party/portage-stable - # Multi repo output: - # bb | in: - # src/third_party/portage-stable - # src/third_party/chromiumos-overlay - if ($3 == "in") - print $NF - while (getline) { - if ($2 == "|") - break; - print $NF; - } -}') -if [[ -n ${repos} ]] ; then - echo "Auto pulling patches from 'bb' branch in repos:" - printf '\t%s\n' ${repos} - - p_flag="" - for r in ${repos} ; do - r=$(r list | awk -v r="${r}" '$1 == r { print $NF }') - p_flag+="${r}:bb " - done - - set -- -p "${p_flag}" "$@" -fi -set -- --cache-dir=~/chromiumos/.cache "$@" - -vexec cbuildbot --buildroot=${d} "$@" -- 2.39.5