#!/bin/sh
# query ini syntax:
#[libvirt SLES12]
#title=SLES12
# quick create query.ini file for SLES12
# first arg must be the list of package to take into account

if [ $# -ne 1 ]
then
    echo "- First arg must be the package list (file)"
    exit 1
fi

file=$1

# we need a title for the main webpage
echo "
[MAINTITLE]
data=Packages SLES12 GA SP1
"

for i in `cat $file`
do
echo "
[$i]
title=$i
url=buglist.cgi?short_desc=$i&resolution=---&resolution=DUPLICATE&classification=SUSE%20Linux%20Enterprise%20Server&query_format=advanced&bug_status=NEW&bug_status=CONFIRMED&bug_status=IN_PROGRESS&bug_status=REOPENED&short_desc_type=allwordssubstr&product=SUSE%20Linux%20Enterprise%20Server%2012%20%28SLES%2012%29&product=SUSE%20Linux%20Enterprise%20Server%2012%20SP1&product=SUSE%20Linux%20Enterprise%20Server%2012%20SP2&product=SUSE%20Linux%20Enterprise%20Server%2012%20SP3"

done
