[Fli4l_dev] Informationen zum Weekly-Tarball vom 02.11.2012 [24238]
Christian Ziemski
cz-nicht at nurfuerspam.de
Fr Nov 9 17:31:29 CET 2012
Da der automatische Zeilenumbruch das Skript "etwas" zerlegt hatte,
hier nun ein zweiter Versuch.
(Laut der Regeln auf fli4l.de sind Anhänge in den Newsgroups ja nicht erlaubt.)
Christian
-- %< ------------------------------------------------------
#!/bin/bash
# Copyright fli4l-Team - team at fli4l.de
#
# Converted from the original DOS-Batch to Linux shellscript by Christian Ziemski 11/2012
#
# #################################
# url of tarball at fli4l.de
url=mirror1.fli4l.de/pub/linux/Mirrors/Fli4L/dev-tarball
# list of gz-packages (packed with zip)
packages="dns_dhcp hd httpd isdn lpdsrv lcd src sshd template tools kernel_2_6_32"
# Note: don't include packages base and doc, they are always downloaded
# list of bz2-packages (packed with bzip2)
bz2packs=""
# no changes after this line needed
# #################################
mkdir -p packages basepack
cd basepack
echo "Download package base."
wget --no-verbose -N ftp://${url}/fli4l-[0-9].[0-9].[0-9]-rev*[0-9].tar.gz
mv fli4l-?.?.?-rev*.tar.gz fli4l-base.tar.gz
cd ..
echo "Search for version in base."
basedir=$(tar -tzf basepack/fli4l-base.tar.gz "*/version.txt" | sed -e "s:/version.txt::")
echo "Version is ${basedir}."
cd packages
echo "Download package doc."
wget --no-verbose -N ftp://${url}/${basedir}-doc.tar.gz
if [ -n "$packages" ]
then
echo "Download gz-packages."
for p in ${packages}
do
wget --no-verbose -N ftp://${url}/${p}.tar.gz
done
fi
if [ -n "$bz2packs" ]
then
echo "Download bz2-packages."
for p in ${bz2packs}
do
wget --no-verbose -N ftp://${url}/${p}.tar.bz2
done
fi
cd ..
echo -e "Extract base in directory: \c"
pwd
tar -xzf basepack/fli4l-base.tar.gz
if [ -n "$packages" ]
then
echo "Extract gz-packages in directory: $(pwd)\${basedir}"
for p in packages/*.gz
do
echo " $p ..."
tar -C ${basedir} -xzf ${p}
done
fi
if [ -n "$bz2packs" ]
then
echo "Extract bz2-packages in directory: $(pwd)\${basedir}"
for p in packages/*.bz2
do
echo " $p ..."
tar -C ${basedir} -xjf $p
done
fi
tarbdir=TARB-$(cat ${basedir}/version.txt)
mkdir -p $tarbdir
echo "Copy Packages to Tarball-Archive ${tarbdir}."
cp -p basepack/* ${tarbdir}
cp -p packages/* ${tarbdir}
rm -f packages/${basedir}-doc.tar.gz
cd ${basedir}
rm -rf config.orig
mv config config.orig
cd ..
echo "Ready"
Mehr Informationen über die Mailingliste Fli4l_dev