postScript.sh 1.1 KB

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