diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-01-19 11:36:00 -0800 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2018-01-19 11:36:00 -0800 |
commit | fe1deb3f4a651268b23a180666028014eea06476 (patch) | |
tree | 987f587619a97c077fa164c9daffdb06953a3eaf /autorelease/scripts/fix-names.sh | |
parent | e60d218d8a9ca0700e4b1d117ddf7b59fa18194a (diff) |
Clean up unused directories in integration repo
Change-Id: I8e936cda534c074661ba6dd357a92c58a3749555
Issue-ID: INT-391
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'autorelease/scripts/fix-names.sh')
-rwxr-xr-x | autorelease/scripts/fix-names.sh | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/autorelease/scripts/fix-names.sh b/autorelease/scripts/fix-names.sh deleted file mode 100755 index 9540ac594..000000000 --- a/autorelease/scripts/fix-names.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2015, 2016 The Linux Foundation. All rights reserved. -############################################################################## - -# autorelease root dir -ROOT=`git rev-parse --show-toplevel`/autorelease - -BUILD_DIR=$ROOT/build - -mkdir -p $BUILD_DIR -cd $BUILD_DIR - -# MAP of path to a parent pom from the perspective of hosting directory -# starting from the autorelease repo root. -# -# Format: <groupId>:<artifactId>:<path> - -fix_name() { - pom=$1 - echo -e "\nScanning $pom" - pomPath=`dirname $pom` - - projectPath=${pomPath#*/} # Path to pom file from the perspective of hosting repo - - relativePath="$projectPath" # Calculated relative path to parent pom - - # Update any existing project names - xmlstarlet ed -P -N x=http://maven.apache.org/POM/4.0.0 \ - -u "/x:project/x:name" -v "$relativePath" \ - "$pom" > "${pom}.new" - mv "${pom}.new" "${pom}" - - # Add missing ones - xmlstarlet ed -P -N x=http://maven.apache.org/POM/4.0.0 \ - -s "/x:project[count(x:name)=0]" -t elem -n name -v "$relativePath" \ - "$pom" > "${pom}.new" - mv "${pom}.new" "${pom}" -} - -# Find all project poms ignoring the /src/ paths (We don't want to scan code) -find . -name pom.xml -not -path "*/src/*" | xargs -I^ -P8 bash -c "$(declare -f fix_name); fix_name ^" |