lib/scripts/fileident
author wenzelm
Wed, 19 Jan 2011 21:01:37 +0100
changeset 41615 f70d2cb26acf
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
clasrified classpath: add in front in accordance to librarypath (cf. b7cd80330a16), for slightly more robustness;

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