From: Aric Gardner Date: Thu, 29 Nov 2018 18:53:14 +0000 (-0500) Subject: Fix autocorrectinfofile X-Git-Tag: v0.19.0^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F13740%2F1;p=releng%2Flftools.git Fix autocorrectinfofile get_committers was renamed as get-committers Change awk field seperator due to change in the output of lftools infofile get-committers Change-Id: Ic7bba44956907635434f97399f36da71a9207a1d Signed-off-by: Aric Gardner --- diff --git a/shell/autocorrectinfofile b/shell/autocorrectinfofile index 32f5e4f8..97fdb256 100755 --- a/shell/autocorrectinfofile +++ b/shell/autocorrectinfofile @@ -106,7 +106,7 @@ main() { git clone -q "$gerritclonebase""$repo" "$DIR"/"$repo" || exit 1 fi - diff="$(diff <(lftools infofile get_committers "$DIR"/LDAP.yaml 2>&-| sort) <(lftools infofile get_committers "$DIR"/"$repo"/INFO.yaml 2>&- | sort))" + diff="$(diff <(lftools infofile get-committers "$DIR"/LDAP.yaml 2>&-| sort) <(lftools infofile get-committers "$DIR"/"$repo"/INFO.yaml 2>&- | sort))" status="$?" diff_array=() @@ -117,11 +117,11 @@ main() { diff_array+=( "$line" ) if [[ $(echo "$line" | grep ">") ]]; then - onlyinINFO+=( "$(echo "$line" | awk -F"'" '{ print $2 }')" ) + onlyinINFO+=( "$(echo "$line" | awk -F"id: " '{ print $2 }')" ) fi if [[ $(echo "$line" | grep "<") ]]; then - onlyinLDAP+=( "$(echo "$line" | awk -F"'" '{ print $2 }')" ) + onlyinLDAP+=( "$(echo "$line" | awk -F"id: " '{ print $2 }')" ) fi done < <(echo "${diff[@]}" ) @@ -130,7 +130,7 @@ main() { for missing in "${onlyinINFO[@]}"; do if ! [ -z "$missing" ]; then echo " DUMMY: sending invite to $missing" - lftools infofile get_committers --id "$missing" "$DIR"/"$repo"/INFO.yaml 2>&- + lftools infofile get-committers --id "$missing" "$DIR"/"$repo"/INFO.yaml 2>&- fi done fi