aboutsummaryrefslogtreecommitdiff
path: root/patchnet-write
blob: e18a403e737eb2aa8327625892b5199cc78b800c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#
# SPDX-License-Identifier: GPL-2.0
# (c) 2020,2022, Mathieu Poirier <mathieu.poirier@linaro.org>
#
# Outputs a SHA1 in a way that it can be digested by the PatchNet model
#
# USAGE:
# cat positive-set.txt | parallel --link patchnet-write :::: - ::: true ::: $1
# cat negative-set.txt | parallel --link patchnet-write :::: - ::: false ::: $1
#
# INPUT:
# $1: A git generated SHA1, i.e "39030e1351aa security: Add LSM hooks to set*gid syscalls"
# $2: true if $1 should be a stable patch, false otherwise
# $3: Name of the output file
#

sha1=$(echo $1 | awk {'print $1'})
echo $sha1: $2 >> $3