lib/scripts/fileident
author wenzelm
Thu, 24 Jun 2010 14:31:01 +0200
changeset 37528 42804fb5dd92
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
slightly more standard data merge: Symtax.merge (K true) avoids equality on abstract type Pretty.T and gracefully accepts overriding, Symtab.join prefers first entry as usual;

#!/usr/bin/env bash
#
# fileident --- produce file identification based

FILE="$1"

if [ -n "$ISABELLE_FILE_IDENT" -a -f "$FILE" -a -r "$FILE" ]
then
  ID=$(cat "$FILE" | $ISABELLE_FILE_IDENT | cut -d " " -f 1) && echo -n "$ID"
fi