Commit 3009ed0b authored by Ricardo Tavares de Oliveira's avatar Ricardo Tavares de Oliveira Committed by Vinicius Ruoso

integrity/generate_mdsum_base.sh: Adjusted to use one of two packs bases

Since we have now two kinds of packs bases, generate_mdsum_base.sh needs to
know what file it will process from. If the "dn" argument is passed, it will
use the "normal" packs base. If the "dt" argument is passed, it will use the
"testing" packs base.
Signed-off-by: default avatarRicardo Tavares de Oliveira <rto07@c3sl.ufpr.br>
parent bc5ceb76
#!/bin/bash
# List of packages in
VBASE=MAINVBASE
VBASEN=MAINVBASEN
VBASET=MAINVBASET
if (( $# != 1 )); then
echo "$(basename $0) (dn|dt)"
exit 1
fi
IN=$(mktemp)
sed "/prd-kernel/d" $VBASE > $IN
INN=$(mktemp)
INT=$(mktemp)
sed "/prd-kernel/d" $VBASEN > $INN
sed "/prd-kernel/d" $VBASET > $INT
# Read package list
both=""
......@@ -30,21 +33,12 @@ REMOVE="/etc/gconf/gconf.xml.mandatory/%gconf-tree.xml \
/usr/local/sbin/prd-nobreak/config.ini"
while read pack version; do
if [[ "$pack" != "|" ]] && [[ "$pack" != "@" ]]; then
both="${both} ${pack}_${version}"
elif [[ "$pack" == "|" ]]; then
pack1=$(cut -d' ' -f1 <<< $version)
version1=$(cut -d' ' -f2 <<< $version)
pack2=$(cut -d' ' -f3 <<< $version)
version2=$(cut -d' ' -f4 <<< $version)
only1="${only1} ${pack1}_${version1}"
only2="${only2} ${pack2}_${version2}"
else
truepack=$(cut -d' ' -f1 <<< $version)
trueversion=$(cut -d' ' -f2 <<< $version)
only2="${only2} ${truepack}_${trueversion}"
fi
done < $IN
only1="${only1} ${pack}_${version}"
done < $INN
while read pack version; do
only2="${only2} ${pack}_${version}"
done < $INT
if [[ "$1" == "dn" ]]; then
packages="$both $only1"
......@@ -113,4 +107,4 @@ fi
cp ${MD5DIR}/export PRD_EXPORT
rm $IN
rm $INN $INT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment