From e522cbff7a7c5f3b5faa09b0e7254032ae80ae71 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 18 Feb 2010 19:05:22 +0100 Subject: on Linux use tsort and reverse with tac, On BSD use tsort -r --- scripts/tsort | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/tsort (limited to 'scripts/tsort') diff --git a/scripts/tsort b/scripts/tsort new file mode 100755 index 000000000..45bd2bc24 --- /dev/null +++ b/scripts/tsort @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +os=$(uname) +case $os in + NetBSD|MirBSD|OpenBSD) + targ="-r" + ;; + *) + targ="|tac" + ;; +esac +if [ -x /usr/bin/tsort ];then + /usr/bin/tsort $targ "$@" +fi + -- cgit v1.2.3