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

     1  #! /bin/bash
     2  set -euo pipefail
     3  
     4  cd "$(git rev-parse --show-toplevel)"
     5  
     6  STD_PATH=src/crypto/ed25519/internal/edwards25519/field
     7  LOCAL_PATH=curve25519/internal/field
     8  LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint)
     9  
    10  git fetch https://go.googlesource.com/go master
    11  
    12  if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
    13      echo "No changes."
    14  else
    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
    19  fi
    20  

View as plain text