...

Text file src/golang.org/x/crypto/curve25519/internal/field/sync.sh

Documentation: golang.org/x/crypto/curve25519/internal/field

     1#! /bin/bash
     2set -euo pipefail
     3
     4cd "$(git rev-parse --show-toplevel)"
     5
     6STD_PATH=src/crypto/ed25519/internal/edwards25519/field
     7LOCAL_PATH=curve25519/internal/field
     8LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint)
     9
    10git fetch https://go.googlesource.com/go master
    11
    12if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
    13    echo "No changes."
    14else
    15    NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint)
    16    echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..."
    17    git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \
    18        git apply -3 --directory=$LOCAL_PATH
    19fi

View as plain text