#!/bin/sh
##############################################################################
#
#  Copyright (c) 2005, Doremi Labs, Inc.
#    All rights reserved.
#
#  Redistribution in source or binary forms, with or without
#  modification, are NOT permitted.
#
#    Doremi Labs, Inc.
#    1020 Chestnut St.
#    Burbank, CA 91506
#    Tel : (818) 562 1101
#    Fax : (818) 562 1109
#
##############################################################################

PKG_TOOL="/doremi/sbin/pkg_tool"

#
# Install a package using pkg_tool
# This function will force the installation of the package (no check)
# Inputs
#   $1: The path of the package
#
install_package(){
  local PACKAGE="$1"

  if ! test -x "${PKG_TOOL}"; then
    return 1
  fi

  # Install package
  "${PKG_TOOL}" --no-check --install "${PACKAGE}"

  return $?
}

#
# main()
#

install_package "$1"

exit $?
