lib/scripts/fileident
author bulwahn
Thu, 29 Jul 2010 17:27:55 +0200
changeset 38075 3d5e2b7d1374
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
adding values command and parsing prolog output

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