diff options
author | Martin Thomson <martin.thomson@gmail.com> | 2017-07-28 12:14:10 +1000 |
---|---|---|
committer | Martin Thomson <martin.thomson@gmail.com> | 2017-07-28 12:14:10 +1000 |
commit | 7ad866c2aa378ee016d9f95785b483b713f68631 (patch) | |
tree | 090901808ca6830a6b3c26d0823a67eb76738b4d /fuzz | |
parent | 836ff4205d598a0dbf474718fac69b876d706a0d (diff) | |
parent | 09b4d491cc6bd42e843931b6c4bfbf720b8485ad (diff) | |
download | nss-hg-7ad866c2aa378ee016d9f95785b483b713f68631.tar.gz |
Merge NSS trunk onto NSS_TLS13_DRAFT19_BRANCH
Diffstat (limited to 'fuzz')
-rwxr-xr-x | fuzz/config/git-copy.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fuzz/config/git-copy.sh b/fuzz/config/git-copy.sh index 1389ddabd..a5c7d371d 100755 --- a/fuzz/config/git-copy.sh +++ b/fuzz/config/git-copy.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash set -e @@ -15,18 +15,19 @@ echo "Copy '$COMMIT' from '$REPO' to '$DIR'" if [ -f $DIR/.git-copy ]; then CURRENT=$(cat $DIR/.git-copy) if [ $(echo -n $COMMIT | wc -c) != "40" ]; then + # On the off chance that $COMMIT is a remote head. ACTUAL=$(git ls-remote $REPO $COMMIT | cut -c 1-40 -) else ACTUAL=$COMMIT fi - if [ CURRENT = ACTUAL ]; then + if [ "$CURRENT" = "$ACTUAL" ]; then echo "Up to date." + exit fi fi -mkdir -p $DIR -git -C $DIR init -q +git init -q $DIR git -C $DIR fetch -q --depth=1 $REPO $COMMIT:git-copy-tmp git -C $DIR reset --hard git-copy-tmp -git -C $DIR show-ref HEAD | cut -c 1-40 - > $DIR/.git-copy +git -C $DIR rev-parse --verify HEAD > $DIR/.git-copy rm -rf $DIR/.git |