+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+args=$(getopt h $*)
+
+function usage {
+ echo "Usage: $0 [-h] script.sh target.app"
+ exit 2
+}
+
+if [ $? != 0 ]; then
+ usage
+fi
+
+set -- $args
+for i ; do
+ case "$i"
+ in
+ -h) usage ; shift ;;
+ --) shift ; break ;;
+ esac
+done
+
+if [ $# != 2 ]; then
+ usage
+fi