Advertisement
Guest User

CommonCrypto build phase script ( before compilation )

a guest
Nov 1st, 2016
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | None | 0 0
  1. modulesDirectory=$DERIVED_FILES_DIR/modules
  2. modulesMap=$modulesDirectory/module.modulemap
  3. modulesMapTemp=$modulesDirectory/module.modulemap.tmp
  4.  
  5. mkdir -p "$modulesDirectory"
  6.  
  7. cat > "$modulesMapTemp" << MAP
  8. module CommonCrypto [system] {
  9.     header "$SDKROOT/usr/include/CommonCrypto/CommonCrypto.h"
  10.     export *
  11. }
  12. MAP
  13.  
  14. diff "$modulesMapTemp" "$modulesMap" >/dev/null 2>/dev/null
  15. if [[ $? != 0 ]] ; then
  16. mv "$modulesMapTemp" "$modulesMap"
  17. else
  18. rm "$modulesMapTemp"
  19. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement