postScript.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. export PATH=/usr/bin/opt/local/bin:/opt/local/sbin:/usr/local/git:$PATH
  3. export SRCROOT="$SRCROOT"
  4. # only used if we SCP the deb over, and this only happens if dpkg-deb and fauxsu are installed
  5. ATV_DEVICE_IP=guest-room.local
  6. #say "$SDKROOT"
  7. echo $SDKROOT
  8. BASE_SDK=`basename $SDKROOT`
  9. if [[ $BASE_SDK == *"Simulator"* ]]
  10. then
  11. exit 0
  12. fi
  13. # xcodes path to the the full framework
  14. TARGET_BUILD_FW="$TARGET_BUILD_DIR"/"$PRODUCT_NAME".$WRAPPER_EXTENSION
  15. echo $TARGET_BUILD_FW
  16. DPKG_BUILD_PATH="$SRCROOT"/layout
  17. FW_FOLDER="$DPKG_BUILD_PATH"/Library/Frameworks
  18. echo $FW_FOLDER
  19. FINAL_FW_PATH=$FW_FOLDER/"$PRODUCT_NAME".$WRAPPER_EXTENSION
  20. rm -rf "$FINAL_FW_PATH"
  21. mkdir -p "$FW_FOLDER"
  22. mkdir -p "$FINAL_FW_PATH"
  23. cp -r "$TARGET_BUILD_FW" "$FW_FOLDER"
  24. pushd "$SRCROOT"
  25. find . -name ".DS_Store" | xargs rm -f
  26. EXE_PATH=$FINAL_FW_PATH/$EXECUTABLE_NAME
  27. ldid -S $EXE_PATH
  28. rm -rf $FINAL_FW_PATH/_CodeSignature
  29. #/usr/local/bin/fakeroot dpkg-deb -b layout
  30. #scp layout.deb root@$ATV_DEVICE_IP:~
  31. #ssh root@$ATV_DEVICE_IP "dpkg -i layout.deb ; killall -9 PineBoard"
  32. exit 0