Scripts/install

From Organic Design wiki
Revision as of 01:43, 24 February 2007 by Rob (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  1. !/bin/sh

. config/options

if [ -z "$1" ]; then

 echo "usage: $0 package_name"
 exit 1

fi

if [ -f $PACKAGES/$1/arch ]; then

 grep -q "$TARGET_ARCH" "$PACKAGES/$1/arch" || exit 0

fi

$SCRIPTS/build $@

printf "%${INDENT}c INSTALL $1\n" >&$SILENT_OUT export INDENT=$((${INDENT:-1}+$INDENT_SIZE))

if [ -f $PACKAGES/$1/install ]; then

 $PACKAGES/$1/install $@ >&$VERBOSE_OUT

else

 mkdir -p $INSTALL/usr/bin
 cp $BUILD/$1*/$1 $INSTALL/usr/bin

fi