cutbox_make_dmg 518 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. DMG_FILE="$1"
  3. if [[ $1 == "" ]]; then
  4. echo "Failed, missing DMG_NAME"
  5. echo ""
  6. echo "Usage: cutbox_make_dmg DMG_NAME"
  7. echo ""
  8. exit 1
  9. fi
  10. if [[ -x $(npm exec which appdmg) ]]; then
  11. echo "[✓] appdmg ok"
  12. else
  13. echo "Failed, missing dependency"
  14. echo "node-appdmg required."
  15. echo "visit: https://github.com/LinusU/node-appdmg"
  16. exit 1
  17. fi
  18. bin_folder=$(dirname $0)
  19. echo "Making new DMG ${DMG_FILE}"
  20. npm exec which appdmg # debug
  21. npm exec appdmg "${bin_folder}/cutbox_appdmg.json" "${DMG_FILE}"