determine_apt_source.sh

#!/bin/bash
#
# "determine_apt_source.sh"
#
# Since the documentation is lagging a bit behind the the development
# speed of OpeenGroupware.org this script helps you to create
# the 'correct' apt-rpm sources-list entry
#
# License: GPL v.2
# Giray Devlet
################################################################################

mkdir /tmp/determine_apt.$$
(cd /tmp/determine_apt.$$; wget http://download.opengroupware.org/packages/apt4rpm/fedora-core3/releases/base/)

pkglist=`grep pkglist /tmp/determine_apt.$$/index.html | \
awk -F"HREF=\"" '{print $2}' | awk -F"\">" '{print $1}' | \
awk -F "pkglist." '{print $2}' | awk -F".bz" '{print $1}'`


echo "You need to add the following lines into /etc/apt/sources-list, or"
echo "in a new file /etc/apt/sources-list.d/OGo.list"
echo " "
echo "<----------------------------------[cut here]-------------------------->"
echo " "
echo "#Name: OpenGroupWare "
echo "#URL: OpenGroupWare.org"
echo " "
echo "### OpenGroupWare Repository "
echo rpm http://download.opengroupware.org/packages/apt4rpm fedora-core3/releases $pkglist
echo " "
echo "<----------------------------------[cut here]-------------------------->"
rm -rf /tmp/determine_apt.$$

[back]