lib/scripts/fileident
author wenzelm
Sun, 07 Feb 2010 20:21:38 +0100
changeset 35023 16f9877abf0b
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
modernized perl scripts: prefer standalone executables; exec bash wrapper script directly -- avoid intermediate process;

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