lib/scripts/fileident
author wenzelm
Thu, 12 Mar 2009 21:55:02 +0100
changeset 30487 a14ff49d3083
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
simplified preparation and outer parsing of specification; export extern cmd interfaces as well;

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