lib/scripts/fileident
author wenzelm
Thu, 06 May 2010 23:57:55 +0200
changeset 36690 97d2780ad6f0
parent 29145 b1c6f4563df7
permissions -rwxr-xr-x
uniform treatment of length = 1 for forced breaks, also makes ML/Pretty.length coincide with Scala/XML.content_length;

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