add some code comments
This commit is contained in:
parent
3deb68c5ec
commit
e01adc9131
1 changed files with 25 additions and 16 deletions
41
run.sh
41
run.sh
|
@ -5,6 +5,12 @@ if [ $# -eq 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 1. create temporary directory
|
||||||
|
# 2. create fifo
|
||||||
|
# 3. run findunusedbd to start fatrace from outside
|
||||||
|
# 4. run sbuild with the correct hooks
|
||||||
|
# 5. if sbuild was successful, collect unused dependencies
|
||||||
|
# 6. remove temporary directory
|
||||||
build () {
|
build () {
|
||||||
dsc="$1"
|
dsc="$1"
|
||||||
archall="$2"
|
archall="$2"
|
||||||
|
@ -26,22 +32,6 @@ build () {
|
||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
check () {
|
|
||||||
dscname="$1"
|
|
||||||
archall="$2"
|
|
||||||
unusedbdname=`basename $dscname .dsc`.${archall}.unusedbd
|
|
||||||
while read bd; do
|
|
||||||
# now run sbuild with "findunusedbd.sh equivs" creating a fake equivs package
|
|
||||||
sbuild --$archall --quiet \
|
|
||||||
--chroot-setup-commands="/home/findunusedbd.sh equivs $bd" \
|
|
||||||
"$dscname"
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo $bd >> "${unusedbdname}".real
|
|
||||||
fi
|
|
||||||
rm -f *.deb *.udeb *.changes
|
|
||||||
done < $unusedbdname
|
|
||||||
}
|
|
||||||
|
|
||||||
for a in "arch-all" "no-arch-all"; do
|
for a in "arch-all" "no-arch-all"; do
|
||||||
echo > buildsuccess.${a}.list
|
echo > buildsuccess.${a}.list
|
||||||
for dsc in $@; do
|
for dsc in $@; do
|
||||||
|
@ -66,6 +56,25 @@ for noarchall in *.no-arch-all.unusedbd; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# 1. for all possibly unused dependencise, run sbuild with a hook creating a
|
||||||
|
# fake equivs package
|
||||||
|
# 2. if sbuild was successful, collect result
|
||||||
|
check () {
|
||||||
|
dscname="$1"
|
||||||
|
archall="$2"
|
||||||
|
unusedbdname=`basename $dscname .dsc`.${archall}.unusedbd
|
||||||
|
while read bd; do
|
||||||
|
# now run sbuild with "findunusedbd.sh equivs" creating a fake equivs package
|
||||||
|
sbuild --$archall --quiet \
|
||||||
|
--chroot-setup-commands="/home/findunusedbd.sh equivs $bd" \
|
||||||
|
"$dscname"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo $bd >> "${unusedbdname}".real
|
||||||
|
fi
|
||||||
|
rm -f *.deb *.udeb *.changes
|
||||||
|
done < $unusedbdname
|
||||||
|
}
|
||||||
|
|
||||||
for a in "arch-all" "no-arch-all"; do
|
for a in "arch-all" "no-arch-all"; do
|
||||||
while read dscname; do
|
while read dscname; do
|
||||||
echo $dscname
|
echo $dscname
|
||||||
|
|
Loading…
Reference in a new issue