Files
scripts/aosp-merger/branches_save.sh
Michael Bestas d10751ac91 aosp-merger: Switch to SPDX copyright header
* Less clutter

Change-Id: Ib8496ec5d02521ce76a886fb0b48133d57a6f707
2023-03-21 04:59:42 +05:30

26 lines
587 B
Bash
Executable File

#!/bin/bash
#
# SPDX-FileCopyrightText: 2017 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
if [ ! -e "build/envsetup.sh" ]; then
echo "Must run from root of repo"
exit 1
fi
TOP="${PWD}"
BRANCHLIST="${TOP}/branches.list"
# Example repo status output:
#project build/make/ branch x
#project device/huawei/angler/ branch x
repo status | grep '^project ' | while read l; do
set ${l}
PROJECTPATH=$(echo ${2} | sed 's|/$||')
BRANCH="${4}"
echo "${PROJECTPATH} ${BRANCH}"
done | sort > "${BRANCHLIST}"