#!/bin/bash

if [ $# -eq 0 ]; then
	echo "usage: $0 RPMFILENAME"
	exit 1
fi

echo -n "dass IT build password: "
read PASSWORD

for i in $*; do
	echo $i
	expect -c "spawn rpm --addsign $i" -c 'expect -ex "Enter pass phrase:"' -c "send $PASSWORD\n" -c 'expect "Pass phrase"' -c 'wait'
	rpm --checksig $i
done

