Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File
Permalink

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge Iframe embedding
swh:1:cnt:f59a67d537d21afd51a5651e4f7856b661998f64
#!/bin/sh
#
# Check the library fingerprint and generate an executable fingerprint, or
# return an error

lib=$1
exe=$2
ext=${HMAC_EXT:-sha1}

# deal with the case where we're run from within the build and OpenSSL is
# not yet installed.  Also, make sure LD_LIBRARY_PATH is properly set in
# case shared libraries are built.
if [ "X$TOP" != "X" ]
then
    if test "$OSTYPE" = msdosdjgpp; then
	PATH="$TOP/apps;$TOP;$PATH"
    else
    	PATH="$TOP/apps:$TOP:$PATH"
    fi
    LD_LIBRARY_PATH=$TOP; export LD_LIBRARY_PATH
else
    LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH
fi

echo "Checking library fingerprint for $lib"
openssl sha1 -hmac etaonrishdlcupfm $lib | sed "s/(.*\//(/" | diff -w $lib.sha1 - || { echo "$libs fingerprint mismatch"; exit 1; }

[ -x $exe.exe ] && exe=$exe.exe

echo "Making fingerprint for $exe"
openssl sha1 -hmac etaonrishdlcupfm -binary $exe > $exe.$ext || rm $exe.$ext

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top