From: Stephen Rothwell Date: Thu, 11 Jun 2015 02:06:08 +0000 (+1000) Subject: make_tree_file: do some tidying up X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=9fbf57b33a2dc0bbc677fc0387d759348a33ca85;p=next-scripts make_tree_file: do some tidying up --- diff --git a/make_abat_scripts b/make_abat_scripts deleted file mode 100755 index 665f23f..0000000 --- a/make_abat_scripts +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -exit 0 - -d="$1" - -[ -d ../abat ] || mkdir ../abat - -i=1 - -cat >"../abat/$d-abat.ozlabs.ibm.com-$i" <"../abat/$d-abat.ozlabs.ibm.com-$i" < Next/Trees - ( -IFS=' ' -while read email type name url ref build; do - [[ "$email" =~ '^#.*$' ]] && continue - tab="\t" - [ $(echo "$name" | wc -c) -le 8 ] && tab="\t\t" - [ "${ref%:*}" = "${ref}" ] || ref=${ref##*:} - [ "$type" = "git" ] && url="$url#$ref" - printf "%s$tab%s\t%s\n" $name $type $url >>Next/Trees -done <$CTRL_FILE -) + cat <<-'EOF' + Trees included into this release: + + Name Type URL + ---- ---- --- + EOF + + IFS=' ' + grep -v '^#' $CTRL_FILE | + while read email type name url ref build; do + tab="\t" + [ ${#name} -le 8 ] && tab="\t\t" + [ "$type" = "git" ] && url="$url#${ref##*:}" + printf "%s$tab%s\t%s\n" $name $type $url + done +) >Next/Trees mv ../SHA1s Next/SHA1s @@ -61,14 +62,11 @@ git branch -f stable refs/remotes/origin/master p="patch-$l-$n" git diff-tree -p "$l.." >"../$p" gpg2 -u 41D5C07A -a -b "../$p" -#echo "$l" > "../LATEST-IS-$n" - -"$bin_dir/make_abat_scripts" "$d" "$l" oldest=$(date --date "3 months ago" '+%Y%m%d') echo "Removing old releases ... <= next-$oldest" -old_tags=$(git ls-remote --tags korg next-\* | +old_tags=$(git ls-remote --tags korg 'next-*[0-9]' | awk -F - '$2 ~ /^[0-9]*$/ && $2 <= '$oldest' { printf("next-%s\n", $2); }') [ "$old_tags" ] && git push korg --delete $old_tags