8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
23 lines
556 B
Bash
23 lines
556 B
Bash
#!/usr/bin/env bash
|
|
|
|
targetDir="$1"
|
|
dllFullPath="$2"
|
|
|
|
dllVersion="$(monodis --assembly "$dllFullPath" | grep ^Version: | cut -f 2 -d : | xargs)"
|
|
[ -z "$dllVersion" ] && echo "Defaulting dllVersion to 0.0.0" && dllVersion="0.0.0"
|
|
dllFileName="$(basename $dllFullPath)"
|
|
dllRootName="$(basename -s .dll $dllFileName)"
|
|
targetPcFile="$targetDir"/"$dllRootName".pc
|
|
|
|
mkdir -p "$targetDir"
|
|
|
|
cat > $targetPcFile << EOF
|
|
Libraries=$dllFullPath
|
|
|
|
Name: $dllRootName
|
|
Description: $dllRootName
|
|
Version: $dllVersion
|
|
Libs: -r:$dllFileName
|
|
EOF
|
|
|
|
echo "Created $targetPcFile"
|