diff options
author | Thierry Reding <treding@nvidia.com> | 2016-11-07 12:34:02 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-11-07 12:34:02 +0100 |
commit | eb586028c2279e0e429a0fff1286aa2c7e116d96 (patch) | |
tree | 21d7ef61cca478f498111eabbc164de88fa5a8f5 | |
parent | 3b97787908f75df06628805e504e353da1c1ac7c (diff) | |
download | maint-scripts-eb586028c2279e0e429a0fff1286aa2c7e116d96.tar.gz |
request-pull: Abort if a message already exists
This prevents the script from overwriting an existing pull request
message.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rwxr-xr-x | request-pull-linux-tegra.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/request-pull-linux-tegra.sh b/request-pull-linux-tegra.sh index 76df93d..1d97a21 100755 --- a/request-pull-linux-tegra.sh +++ b/request-pull-linux-tegra.sh @@ -90,6 +90,11 @@ for branch in ${arm_soc}; do from=$(git config --get sendemail.from) fi + if test -f "$message"; then + echo "ERROR: file $message already exists" + exit 1 + fi + exec 3> "$message" echo "From $email $date" >&3 |