Lakka/scripts/install
Stephan Raue 85df5ed025 scripts/install:
- install init scripts to /etc/init.d
2009-12-29 19:40:15 +01:00

42 lines
855 B
Bash
Executable File

#!/bin/sh
. config/options
PKG_DIR=`find $PACKAGES -type d -name $1`
if [ -z "$1" ]; then
echo "usage: $0 package_name"
exit 1
fi
if [ -f $PKG_DIR/arch ]; then
grep -q "\-$TARGET_ARCH" "$PKG_DIR/arch" && exit 0
fi
if [ -f $PKG_DIR/platform ]; then
grep -q "\-$TARGET_PLATFORM" "$PKG_DIR/platform" && exit 0
fi
if [ -d $PKG_DIR/init.d ]; then
mkdir -p $INSTALL/etc/init.d
cp $PKG_DIR/init.d/* $INSTALL/etc/init.d/
fi
if [ -d $PKG_DIR/conf.d ]; then
mkdir -p $INSTALL/etc/conf.d
cp $PKG_DIR/conf.d/* $INSTALL/etc/conf.d/
fi
$SCRIPTS/build $@
printf "%${INDENT}c INSTALL $1\n" >&$SILENT_OUT
#dialog --infobox "%${INDENT}c INSTALL $1\n" 15 40
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
if [ -f $PKG_DIR/install ]; then
$PKG_DIR/install $@ >&$VERBOSE_OUT
else
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/$1 $INSTALL/usr/bin
fi