grab-logs.sh
Download the build logs for a list of architectures. Only downloads the logs if they are present in the server. Logs are saved in logs directory within the source tree. By default looks at build logs for i686, x86_64, noarch and armv7hl. Signed-off-by: Miguel Flores Silverio <floresmigu3l@gmail.com>
This commit is contained in:
parent
1869b36cb3
commit
52c10c85bf
@ -1,16 +1,35 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Script helps download the build logs for the current tree.
|
||||||
|
# The downloaded logs will be saved in a logs/ within the
|
||||||
|
# tree.
|
||||||
|
|
||||||
|
BASEDIR="$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")"
|
||||||
|
pushd $BASEDIR > /dev/null
|
||||||
|
|
||||||
VER=$(fedpkg verrel)
|
VER=$(fedpkg verrel)
|
||||||
ver=$(echo $VER | sed -e 's/-/ /g' | awk '{print $2}')
|
ver=$(echo $VER | sed -e 's/-/ /g' | awk '{print $2}')
|
||||||
rev=$(echo $VER | sed -e 's/-/ /g' | awk '{print $3}')
|
rev=$(echo $VER | sed -e 's/-/ /g' | awk '{print $3}')
|
||||||
|
|
||||||
if [ -d logs ]; then
|
# keep logs in one place. If logs directory does not exist, make it.
|
||||||
DIR=logs/
|
if [ -d "$BASEDIR/logs" ]; then
|
||||||
|
DIR="$BASEDIR/logs"
|
||||||
else
|
else
|
||||||
DIR=./
|
mkdir "$BASEDIR/logs"
|
||||||
|
DIR="$BASEDIR/logs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wget -O $DIR/build-$VER-i686.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/i686/build.log
|
# Common architectures that have build logs.
|
||||||
wget -O $DIR/build-$VER-x86-64.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/x86_64/build.log
|
ARCHS[0]=i686
|
||||||
wget -O $DIR/build-$VER-noarch.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/noarch/build.log
|
ARCHS[1]=x86_64
|
||||||
|
ARCHS[2]=noarch
|
||||||
|
ARCHS[3]=armv7hl
|
||||||
|
|
||||||
|
for arch in ${ARCHS[@]}; do
|
||||||
|
URL=http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/$arch/build.log
|
||||||
|
# Only download logs if exist
|
||||||
|
wget --spider -q $URL
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
wget -O $DIR/build-$VER-$arch.log $URL
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
popd > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user