#! /bin/sh -e # $Id$ # $URL$ # Copyright (C) 2006, 2007 Tilburg University # # This file is part of uvt-sum. uvt-sum is free software; you can redistribute # it and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the License, # or (at your option) any later version. You should have received a copy of # the GNU General Public License along with this file (see COPYING). case $# in 0) file="$(mktemp)" trap 'rm -f "$file"' 0 cat >"$file" md5sum <"$file" ;; 1) file="$1" md5sum "$file" ;; *) echo "Too many arguments, usage: $0 [filename]" >&2 exit 2 esac exec <"$file" exec cat