New package autofirma. Autofirma is an application developed by the Ministry of Finance and Public Administration of Spain to implement document signing for the spanish administration. OBS-URL: https://build.opensuse.org/request/show/1118879 OBS-URL: https://build.opensuse.org/package/show/Java:packages/autofirma?expand=0&rev=1
32 lines
637 B
Bash
32 lines
637 B
Bash
#!/bin/bash
|
|
|
|
function getAutoFirmaDirectory
|
|
{
|
|
for path in /usr/share/java/autofirma \
|
|
/usr/lib64/autofirma \
|
|
/usr/lib/AutoFirma ; do
|
|
if [ -d "$path" ]; then
|
|
echo "$path"
|
|
return
|
|
fi
|
|
done
|
|
}
|
|
|
|
function getAutoFirmaJar
|
|
{
|
|
afirmadir="$1"
|
|
for jar in AutoFirma.jar autofirma.jar; do
|
|
if [ -e "$afirmadir/$jar" ]; then
|
|
echo "$afirmadir/$jar"
|
|
return
|
|
fi
|
|
done
|
|
}
|
|
|
|
afirmadir=`getAutoFirmaDirectory`
|
|
$afirmadir/check-autofirma-certificate.py || exit 1
|
|
|
|
afirmajar=`getAutoFirmaJar "$afirmadir"`
|
|
java -jar "$afirmajar" "$@"
|
|
|