[Pkg-fonts-devel] my rebuild scripts
Here's a few of my scripts for rebuilding all rdeps of a package.
apt-get install moreutils devscripts dose-extra
Place the attached scripts somewhere, I use ~/debian/ but probably ~/bin/
would be better (as it's picked into $PATH by the default .bashrc).
To run a rebuild:
nice parallel sbuild -- `~/debian/rdeps-for-source fontforge`
(if you have DEB_BUILT_OPTS=parallel=X set, it's wise to reduce that)
To post-process the results:
~/debian/sortst
--
An imaginary friend squared is a real enemy.
#!/bin/bash
for x in "$@"
do
grep-dctrl -r -S "^${x/\./\\.}\\b" -s Package /var/lib/apt/lists/*_dists_unstable_*_binary-amd64_Packages|cut -d' ' -f 2
done
#!/bin/bash
# Depends: devscripts dose-extra moreutils
# build-rdeps takes three ages and two forevers, so if we need to run it
# multiple times, do so in parallel.
parallel build-rdeps -- `~/debian/binaries-for-source "$@"`|
grep -v '^Reverse Build-depends'|
grep -v -- '^------------'|
grep -v '^Found '|
grep -v '^No reverse build-depends found'|
grep -v '^$'|
sort|
uniq
#!/bin/bash
# Sorts sbuild log files in current directory into subdirectories of ./logs/
# Doing it while a rebuild is still ongoing is fine, partial logs will be
# skipped.
set -e
mkdir -p logs/{successful,skipped,attempted,failed}
mv *.build logs/ ||:
cd logs
for x in `ls *.build|sort|tac` # do symlinks before actual logs
do
ST="$(grep -a '^Status: \(successful\|skipped\|attempted\|failed\)$' "$x"|cut -d' ' -f2)"
if [ -z "$ST" ]
then
echo "$x has no valid status"
else
mv "$x" "$ST/"
fi
done
Reply to: