Updates:
will now use a user-specified diff file if one is available, which is probably more accurate than the changelog file uses add_files to add things to the tree rather than cp, meaning sym-links etc. happen properly
This commit is contained in:
parent
84c05090cb
commit
71922ba302
40
update-cd
40
update-cd
|
@ -1,13 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# update-cd v 0.1
|
# update-cd v 0.2
|
||||||
#
|
#
|
||||||
# (c) Steve McIntyre <stevem@chiark.greenend.org.uk> Released under
|
# (c) Steve McIntyre <stevem@chiark.greenend.org.uk> Released under
|
||||||
# GNU GPL v2 5th December 2000
|
# GNU GPL v2 1st January 2001
|
||||||
#
|
#
|
||||||
# Quick and dirty script to create update CDs for people to upgrade
|
# Quick and dirty script to create update CDs for people to upgrade
|
||||||
# from potato (2.2r0) to the latest release level
|
# from potato (2.2r0) to the latest release level
|
||||||
|
#
|
||||||
# Configuration goes here.
|
# Configuration goes here.
|
||||||
# Where is your mirror?
|
# Where is your mirror?
|
||||||
MIRROR=${MIRROR:-/debian}
|
MIRROR=${MIRROR:-/debian}
|
||||||
|
@ -33,6 +33,11 @@ CODENAME=potato
|
||||||
# Path where the images will be written
|
# Path where the images will be written
|
||||||
OUT=/scratch/debian-cd
|
OUT=/scratch/debian-cd
|
||||||
|
|
||||||
|
# Location of the diff file to use to determine the changes. If you leave
|
||||||
|
# this blank, we'll try to determine the changes from the ChangeLog files,
|
||||||
|
# which is probably less accurate.
|
||||||
|
DIFF=~/r2.diff
|
||||||
|
|
||||||
REL=Debian"$VER"
|
REL=Debian"$VER"
|
||||||
CLOG=dists/$REL/ChangeLog
|
CLOG=dists/$REL/ChangeLog
|
||||||
NUCLOG=dists/$REL/non-US/ChangeLog
|
NUCLOG=dists/$REL/non-US/ChangeLog
|
||||||
|
@ -50,6 +55,7 @@ scanpackages=$BASEDIR/tools/scanpackages
|
||||||
scansources=$BASEDIR/tools/scansources
|
scansources=$BASEDIR/tools/scansources
|
||||||
set_mkisofs_opts=$BASEDIR/tools/set_mkisofs_opts
|
set_mkisofs_opts=$BASEDIR/tools/set_mkisofs_opts
|
||||||
adddirs=$BASEDIR/tools/add_dirs
|
adddirs=$BASEDIR/tools/add_dirs
|
||||||
|
addfiles=$BASEDIR/tools/add_files
|
||||||
|
|
||||||
echo Cleaning up
|
echo Cleaning up
|
||||||
rm -rf $UPD
|
rm -rf $UPD
|
||||||
|
@ -72,7 +78,11 @@ cd $MIRROR
|
||||||
|
|
||||||
echo Creating main-section list
|
echo Creating main-section list
|
||||||
|
|
||||||
egrep -e ^dists.*\\.deb$ -e ^dists.*\\.gz$ -e ^dists.*\\.dsc$ $CLOG >$UPD/list
|
if [ -e $DIFF ] ; then
|
||||||
|
grep -v non-US ~/r2.diff >$UPD/list
|
||||||
|
else
|
||||||
|
egrep -e ^dists.*\\.deb$ -e ^dists.*\\.gz$ -e ^dists.*\\.dsc$ $CLOG >$UPD/list
|
||||||
|
fi
|
||||||
if [ "$NONFREE"x != "1"x ] ; then
|
if [ "$NONFREE"x != "1"x ] ; then
|
||||||
echo Removing non-free
|
echo Removing non-free
|
||||||
grep -v non-free $UPD/list > $UPD/list1
|
grep -v non-free $UPD/list > $UPD/list1
|
||||||
|
@ -80,16 +90,17 @@ if [ "$NONFREE"x != "1"x ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Creating trees
|
echo Creating trees
|
||||||
for FILE in `cat $UPD/list`
|
cat $UPD/list | xargs $addfiles $UPD/CD1 $MIRROR
|
||||||
do
|
cat $UPD/list | xargs $addfiles $UPD/CD2 $MIRROR
|
||||||
cp --parents -dpRl $FILE $UPD/CD1 2>/dev/null
|
|
||||||
cp --parents -dpRl $FILE $UPD/CD2 2>/dev/null
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$NONUS"x != ""x ] ; then
|
if [ "$NONUS"x != ""x ] ; then
|
||||||
echo Creating non-US list
|
echo Creating non-US list
|
||||||
cd $NONUS
|
cd $NONUS
|
||||||
|
if [ -e $DIFF ] ; then
|
||||||
|
grep non-US ~/r2.diff >$UPD/nu-list
|
||||||
|
else
|
||||||
egrep -e ^dists.*\\.deb$ -e ^dists.*\\.gz$ -e ^dists.*\\.dsc$ $NUCLOG | sed 's?^stable?dists/potato?g' > $UPD/nu-list
|
egrep -e ^dists.*\\.deb$ -e ^dists.*\\.gz$ -e ^dists.*\\.dsc$ $NUCLOG | sed 's?^stable?dists/potato?g' > $UPD/nu-list
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$NONFREE"x != "1"x ] ; then
|
if [ "$NONFREE"x != "1"x ] ; then
|
||||||
echo Removing non-free
|
echo Removing non-free
|
||||||
|
@ -98,11 +109,8 @@ if [ "$NONUS"x != ""x ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Creating non-US trees
|
echo Creating non-US trees
|
||||||
for FILE in `cat $UPD/nu-list`
|
cat $UPD/nu-list | xargs $addfiles $UPD/CD1 $MIRROR
|
||||||
do
|
cat $UPD/nu-list | xargs $addfiles $UPD/CD2 $MIRROR
|
||||||
cp --parents -dpRl $FILE $UPD/CD1 2>/dev/null
|
|
||||||
cp --parents -dpRl $FILE $UPD/CD2 2>/dev/null
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The full update will not fit on a single CD, so split it by architecture, arbitrarily
|
# The full update will not fit on a single CD, so split it by architecture, arbitrarily
|
||||||
|
@ -131,7 +139,9 @@ do
|
||||||
for CAT in *
|
for CAT in *
|
||||||
do
|
do
|
||||||
if [ $CAT != '*' ] ; then
|
if [ $CAT != '*' ] ; then
|
||||||
|
if [ -d $CAT ] ; then
|
||||||
cd $CAT
|
cd $CAT
|
||||||
|
fi
|
||||||
for FILE in *.deb
|
for FILE in *.deb
|
||||||
do
|
do
|
||||||
if [ $FILE != '*.deb' ] ; then
|
if [ $FILE != '*.deb' ] ; then
|
||||||
|
@ -146,8 +156,10 @@ do
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
if [ -d ../$CAT ] ; then
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
cd $UPD
|
cd $UPD
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue