makedist/obsoleted/copy_repository.sh

31 lines
720 B
Bash
Raw Normal View History

2011-05-04 02:30:35 +02:00
#!/bin/bash
#
# copy_repository.sh
#
# Copies all files from devel repository to its own dir
#
# Copyright (c) 2004 by Silvan Calarco - QiLinux distribution
#
# Options:
#
# %1: local repository dir (e.g. /var/ftp/pub/QiLinux/stable/1.0/
if [ -z "$1" -o ! -d "$1" ]; then
echo "Usage: $0 <local destination repository dir>"
exit 1
fi
DESTREPOSITORYDIR=$1
SOURCEREPOSITORYDIR=/var/ftp/pub/QiLinux/devel/
RPMIN=$DESTREPOSITORYDIR/utils/rpms-list
SRPMIN=$DESTREPOSITORYDIR/utils/srpms-list
while read line size; do
cp $SOURCEREPOSITORYDIR/RPMS/i586/$line $DESTREPOSITORYDIR/RPMS/i586/
done < $RPMIN
while read line size; do
cp $SOURCEREPOSITORYDIR/SRPMS/$line $DESTREPOSITORYDIR/SRPMS/
done < $SRPMIN