lib/scripts/fileident
author wenzelm
Tue, 25 May 2010 21:49:44 +0200
changeset 37118 ccae4ecd67f4
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
eliminated slightly odd Library/Library session setup (cf. d7711be8c3a9) which is obsolete due to usedir -f HOL_Library_ROOT.ML;

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