1
0
mirror of https://github.com/golang/go synced 2024-11-27 04:01:19 -07:00
go/misc/osx/utils.bash
Scott Lawrence dd731478b8 misc/osx: Add scripts to create OS X package and disk image
Fixes #2327.

R=golang-dev, rsc, roberto, jdpoirier
CC=golang-dev
https://golang.org/cl/5375049
2011-11-18 19:05:53 -06:00

32 lines
802 B
Bash

#!/bin/bash
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
echo "Attempting to locate needed utilities..."
# PackageMaker
PM=/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
if [ ! -x ${PM} ]; then
PM=/Developer${PM}
if [ ! -x ${PM} ]; then
echo "Could not find PackageMaker; aborting!"
fi
fi
echo " PackageMaker : ${PM}"
# hdiutil. If this doesn't exist, your OS X installation is horribly borked,
# but let's check anyway...
if which hdiutil > /dev/null; then
HDIUTIL=`which hdiutil`
echo " hdiutil : ${HDIUTIL}"
fi
# Ditto for osascript
if which osascript > /dev/null; then
OSASCRIPT=`which osascript`
echo " osascript : ${OSASCRIPT}"
fi