Files
Arch-R/packages/tools/autoupdate/install
2010-08-31 14:46:37 +02:00

33 lines
925 B
Bash
Executable File

#!/bin/sh
. config/options $1
mkdir -p $INSTALL/usr/bin
if [ "$DEVTOOLS" = "yes" ]; then
cp $PKG_DIR/scripts/autoupdate.devel $INSTALL/usr/bin/autoupdate
else
cp $PKG_DIR/scripts/autoupdate.release $INSTALL/usr/bin/autoupdate
fi
mkdir -p $INSTALL/etc
if [ -f $PROJECT_DIR/$PROJECT/autoupdate/repo.conf ]; then
cp $PROJECT_DIR/$PROJECT/autoupdate/repo.conf $INSTALL/etc
else
cp $PKG_DIR/config/repo.conf $INSTALL/etc
fi
if [ -f $PROJECT_DIR/$PROJECT/autoupdate/update.key.db ]; then
cp $PROJECT_DIR/$PROJECT/autoupdate/update.key.db $INSTALL/etc
fi
if [ -f $PROJECT_DIR/$PROJECT/autoupdate/update.conf ]; then
cp $PROJECT_DIR/$PROJECT/autoupdate/update.conf $INSTALL/etc
else
mkdir -p $INSTALL/usr/config
cp $PKG_DIR/config/update.conf $INSTALL/usr/config
fi
mkdir -p $INSTALL/etc/crontabs
echo -e "1 */6 * * *\t/usr/bin/autoupdate" >> $INSTALL/etc/crontabs/root