File update-dsc.sh of Package intelmq

#!/bin/bash

orig=(*.orig.tar.gz)
all=(*.tar.gz)
sed -i "s/^DEBTRANSFORM-TAR.*/DEBTRANSFORM-TAR: $orig/" *.dsc
sed -i "s/^DEBTRANSFORM-FILES-TAR.*/DEBTRANSFORM-FILES-TAR: ${all[*]}/" *.dsc
for file in *.dsc; do
    sed -i '/^ / d' $file
done

for file in *.tar.gz; do
    md5sum=$(md5sum $file | awk '{print $1}')
    size=$(du -b $file | awk '{print $1}')
    for dscfile in *.dsc; do
        echo " $md5sum $size $file" >> $dscfile
    done
done
openSUSE Build Service is sponsored by