lib/scripts/fileident
author wenzelm
Tue, 04 Aug 2009 13:35:33 +0200
changeset 32321 13920dbe4547
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
more uniform handling of ISABELLE_HOME_USER component; discontinued ISABELLE_IGNORE_USER_SETTINGS (ever used? cf. c567f9fd61a2);

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