diff options
author | Logan Chien <loganchien@google.com> | 2017-08-31 19:15:50 +0800 |
---|---|---|
committer | Logan Chien <loganchien@google.com> | 2017-09-12 14:34:44 +0800 |
commit | 629ed239a9d27f2b58697ef48d7a12c81e5d74cf (patch) | |
tree | 114f68e6444a78a0cb4dd6f432593a538210e59b /import_scrypt.sh | |
parent | 581021037c04fb2cd8dcbfd643cd9b9545f6a2b2 (diff) | |
download | scrypt-629ed239a9d27f2b58697ef48d7a12c81e5d74cf.tar.gz |
Fix import_scrypt.sh
This commit fixes various issues in import_scrypt.sh:
* Add `-N` option to `diff` command so that arm_neon.diff can be
generated by import_scrypt.sh
* Rename SCRYPT_PATCHES_bionic_SOURCES to
SCRYPT_PATCHES_arm_neon_SOURCES
* Reorder SCRYPT_PATCHES_arm_neon_SOURCES to mimic git-diff output
* Add missing `lib/crypto/crypto_scrypt-sse.c` file for
use_openssl_pbkdf2.patch
* Add `-f` to `rm` command in the `generate` command because `config.h`
is not in the upstream release tarball
* Replace typo `$SCRYPT_DIR_ORIG_ORIG` with `$SCRYPT_DIR_ORIG`
* Rename arm-neon.patch to arm_neon.patch (for consistency)
Bug: 65425184
Test: ./import_scrypt.sh import upstream/scrypt-1.1.6.tgz
Test: ./import_scrypt.sh generate patches/arm_neon.patch \
upstream/scrypt-1.1.6.tgz
Test: ./import_scrypt.sh generate patches/use_openssl_pbkdf2.patch \
upstream/scrypt-1.1.6.tgz
Change-Id: I843a21440527ed4037525468e9f66630f24b4cee
Diffstat (limited to 'import_scrypt.sh')
-rwxr-xr-x | import_scrypt.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/import_scrypt.sh b/import_scrypt.sh index 324eae6..d85d763 100755 --- a/import_scrypt.sh +++ b/import_scrypt.sh @@ -90,7 +90,7 @@ function main() { declare -r patch=$1 shift || usage "No patch file specified." [ -d $SCRYPT_DIR ] || usage "$SCRYPT_DIR not found, did you mean to use generate?" - [ -d $SCRYPT_DIR_ORIG_ORIG ] || usage "$SCRYPT_DIR_ORIG not found, did you mean to use generate?" + [ -d $SCRYPT_DIR_ORIG ] || usage "$SCRYPT_DIR_ORIG not found, did you mean to use generate?" regenerate $patch elif [ "$command" = "generate" ]; then declare -r patch=$1 @@ -395,7 +395,7 @@ function generate() { for i in $NEEDED_SOURCES; do echo "Restoring $i" - rm -r $SCRYPT_DIR/$i + rm -rf $SCRYPT_DIR/$i cp -rf $i $SCRYPT_DIR/$i done @@ -484,7 +484,7 @@ function generatepatch() { rm -f $patch touch $patch for i in $sources; do - LC_ALL=C TZ=UTC0 diff -aup $SCRYPT_DIR_ORIG/$i $SCRYPT_DIR/$i >> $patch && die "ERROR: No diff for patch $path in file $i" + LC_ALL=C TZ=UTC0 diff -aupN $SCRYPT_DIR_ORIG/$i $SCRYPT_DIR/$i >> $patch && die "ERROR: No diff for patch $path in file $i" done echo "Generated patch $patch" echo "NOTE To make sure there are not unwanted changes from conflicting patches, be sure to review the generated patch." |