lib/scripts/fileident
author wenzelm
Wed, 03 Nov 2010 10:18:05 +0100
changeset 40312 dff9f73a3763
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
more conventional exceptions for abstract syntax operations -- eliminated ancient SYS_ERROR; proper signature constraint;

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