#!/bin/bash
-. "$(dirname $0)/common.sh"
+# shellcheck source=./common.sh
+. "$(dirname "$0")/common.sh"
# Don't do releases in the wee hours :-)
h=$(date '+%k')
}
read -r -p "Yubikey token: " tok
-ssh git@gitolite.kernel.org 2fa val-session $tok
+# shellcheck disable=SC2029
+ssh git@gitolite.kernel.org 2fa val-session "$tok"
# This means I get the right tag if I finish after midnight
d=$(date --date "5 hours ago" '+%Y%m%d')
EOF
IFS=' '
- grep -v '^#' $CTRL_FILE |
- while read email type name url ref build; do
- [ "$type" = "branch" ] && continue
- tab="\t"
- [ ${#name} -lt 8 ] && tab="\t\t"
- [ "$type" = "git" ] && url="$url#${ref##*:}"
- printf "%s$tab%s\t%s\n" $name $type $url
- done
+ while read -r email type name url ref _; do
+ case "$email" in
+ \#*) continue;;
+ esac
+ [ "$type" = "branch" ] && continue
+ tab="\t"
+ [ ${#name} -lt 8 ] && tab="\t\t"
+ [ "$type" = "git" ] && url="$url#${ref##*:}"
+ printf "%s$tab%s\t%s\n" "$name" "$type" "$url"
+ done <"$CTRL_FILE"
) >Next/Trees
mv ../SHA1s Next/SHA1s
grep -v '^Checking out files:' ../merge.log >Next/merge.log
-printf -- "-next-%s\n" $d >localversion-next
+printf -- "-next-%s\n" "$d" >localversion-next
git add Next localversion-next
git commit -s -v -a -m "Add linux-next specific files for $d"
echo "Removing old releases ... <= next-$oldest"
old_tags=$(git tag -l 'next-*[0-9]' |
- awk -F - '$2 ~ /^[0-9]*$/ && $2 <= '$oldest' { printf("next-%s\n", $2); }')
+ awk -F - -v oldest="$oldest" '$2 ~ /^[0-9]*$/ && $2 <= oldest { printf("next-%s\n", $2); }')
+# shellcheck disable=SC2086
[ "$old_tags" ] && git tag -d $old_tags
echo Pushing to korg ...