diff options
author | Matthias Maennich <maennich@google.com> | 2020-12-02 11:38:22 +0000 |
---|---|---|
committer | Matthias Maennich <maennich@google.com> | 2020-12-02 11:55:37 +0000 |
commit | cd17eb739731d62fe97fe30cc80be97633794969 (patch) | |
tree | 692f6de3ba88a5b8ce399144c6d1657ce9287c99 /multi-switcher.sh | |
parent | 51918f884da73464198de81a56833c6a6845d275 (diff) | |
download | build-cd17eb739731d62fe97fe30cc80be97633794969.tar.gz |
multi-switcher: support new common-modules layout
Also get rid of the old, now unused scheme for cuttlefish and goldfish
modules.
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Ia7fb4eabea88f2ebea14912a3e6e56f301a0d2c6
Diffstat (limited to 'multi-switcher.sh')
-rwxr-xr-x | multi-switcher.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/multi-switcher.sh b/multi-switcher.sh index 4e0bb79..366539d 100755 --- a/multi-switcher.sh +++ b/multi-switcher.sh @@ -20,11 +20,13 @@ BRANCH=$1 pushd $BASE > /dev/null - if [[ ! ( -d common-${BRANCH} || -d common${BRANCH} ) || ${BRANCH} == "" ]]; then + if [[ ! ( -d common-${BRANCH} || -d common${BRANCH} ) \ + || ${BRANCH} == "" \ + || ${BRANCH} == "modules" ]]; then echo "usage: $0 <branch>" echo echo "Branches available: " - ls -d common-* | sed 's/common-/\t/g' + ls -d common-* | sed 's/common-/\t/g' | grep -v modules ls -d common1?-* | sed 's/common/\t/g' exit 1 fi @@ -39,14 +41,17 @@ pushd $BASE > /dev/null alt_name="5.4" fi - for dir in common cuttlefish-modules goldfish-modules; do + for dir in common common-modules/virtual-device; do if [ -L ${dir} ]; then rm ${dir} fi for candidate in ${dir}-${BRANCH} ${dir}-${alt_name} ${dir}${BRANCH}; do if [ -d ${candidate} ]; then - ln -vs ${candidate} ${dir} + ( + cd $(dirname $candidate) + ln -vs $(basename ${candidate}) $(basename ${dir}) + ) fi done done |