Skip to content

Instantly share code, notes, and snippets.

@scottyab
Created December 17, 2013 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottyab/8003892 to your computer and use it in GitHub Desktop.
Save scottyab/8003892 to your computer and use it in GitHub Desktop.
Script to rename bouncycastle files to be spongycastle. From https://github.com/rtyley/spongycastle/
#!/bin/bash
# no further use for remaining crypto stuff
rm -Rf crypto
# Package rename org.bouncycastle to org.spongycastle
find -name bouncycastle | xargs rename s/bouncycastle/spongycastle/
find bc* -type f | xargs sed -i s/bouncycastle/spongycastle/g
# BC to SC for provider name
find bc* -type f | xargs sed -i s/\"BC\"/\"SC\"/g
# Rename 'bc' artifacts to 'sc'
rename s/^bc/sc/ *
find -name 'pom.xml' | xargs sed -i s/\>bc/\>sc/g
# Rename maven artifact 'names' to use Spongy rather than Bouncy
find -name 'pom.xml' | xargs sed -i s/\>Bouncy/\>Spongy/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment