lib/scripts/fileident
author wenzelm
Mon, 04 Jan 2010 21:49:47 +0100
changeset 34254 14f6df4f473d
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
shell functions "isabelle-process" and "isabelle" refer to the proper executables statically -- for interactive use or sloppy bash scripts;

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