lib/scripts/fileident
author wenzelm
Wed, 17 Jun 2009 23:22:52 +0200
changeset 31695 36c5c15597f2
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
more robust poly startup, by restricting heap size (otherwise it fails on very large memory); removed Poly/ML 4.x variant;

#!/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