diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
commit | aff03b0a67c41cf7af5df9c9eef715a8b27a2667 (patch) | |
tree | aa2909ae4718f81c83c8cfb68c1f5a23485b3173 /security/nss/fuzz/config/git-copy.sh | |
parent | bdb4ff581677ad1cd411b55a68c87534f9a64882 (diff) | |
parent | 11caf6ecb3cb8c84d2355a6c6e9580a290147e92 (diff) | |
download | UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.gz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.lz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.xz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into js_dom_performance-resource-timing_1
Diffstat (limited to 'security/nss/fuzz/config/git-copy.sh')
-rw-r--r-- | security/nss/fuzz/config/git-copy.sh | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/security/nss/fuzz/config/git-copy.sh b/security/nss/fuzz/config/git-copy.sh index a9e817e2a..a5c7d371d 100644 --- a/security/nss/fuzz/config/git-copy.sh +++ b/security/nss/fuzz/config/git-copy.sh @@ -7,18 +7,18 @@ if [ $# -lt 3 ]; then exit 2 fi -REPO="$1" -COMMIT="$2" -DIR="$3" +REPO=$1 +COMMIT=$2 +DIR=$3 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 +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 -) + ACTUAL=$(git ls-remote $REPO $COMMIT | cut -c 1-40 -) else - ACTUAL="$COMMIT" + ACTUAL=$COMMIT fi if [ "$CURRENT" = "$ACTUAL" ]; then echo "Up to date." @@ -26,9 +26,8 @@ if [ -f "$DIR"/.git-copy ]; then fi fi -rm -rf "$DIR" -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" rev-parse --verify HEAD > "$DIR"/.git-copy -rm -rf "$DIR"/.git +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 rev-parse --verify HEAD > $DIR/.git-copy +rm -rf $DIR/.git |