From 8a763b8a19510b410cf6571021e9c30d841c4155 Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Thu, 29 Nov 2018 13:53:14 -0500 Subject: [PATCH] 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 --- shell/autocorrectinfofile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.16.6