diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-18 19:05:22 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-18 19:05:22 +0100 |
commit | e522cbff7a7c5f3b5faa09b0e7254032ae80ae71 (patch) | |
tree | 0db2f63ff6cf10317a9a315cfb62de442d4bf958 /scripts/tsort | |
parent | 2440d844c6f493a8439c493adca88caf5e0da58f (diff) |
on Linux use tsort and reverse with tac, On BSD use tsort -r
Diffstat (limited to 'scripts/tsort')
-rwxr-xr-x | scripts/tsort | 17 |
1 files changed, 17 insertions, 0 deletions
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 + |