From ecc34bcfbf6fedbd87f34c8b1b263e2aa8141abd Mon Sep 17 00:00:00 2001 From: Jay Freeman Date: Sat, 28 Jun 2008 18:45:02 +0000 Subject: Made nmedit deterministic. git-svn-id: http://svn.telesphoreo.org/trunk@345 514c082c-b64e-11dc-b46d-3d985efe055d --- util/arm-apple-darwin8-nmedit | 1 + util/arm-apple-darwin9-nmedit | 1 + util/nmedit | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 120000 util/arm-apple-darwin8-nmedit create mode 120000 util/arm-apple-darwin9-nmedit create mode 100755 util/nmedit (limited to 'util') diff --git a/util/arm-apple-darwin8-nmedit b/util/arm-apple-darwin8-nmedit new file mode 120000 index 000000000..f5fa6e44b --- /dev/null +++ b/util/arm-apple-darwin8-nmedit @@ -0,0 +1 @@ +nmedit \ No newline at end of file diff --git a/util/arm-apple-darwin9-nmedit b/util/arm-apple-darwin9-nmedit new file mode 120000 index 000000000..f5fa6e44b --- /dev/null +++ b/util/arm-apple-darwin9-nmedit @@ -0,0 +1 @@ +nmedit \ No newline at end of file diff --git a/util/nmedit b/util/nmedit new file mode 100755 index 000000000..674579e73 --- /dev/null +++ b/util/nmedit @@ -0,0 +1,30 @@ +#!/bin/bash +base=$(basename "$0") +if [[ $0 == */* ]]; then + self=${0} +else + self=$(which "$0") +fi +self=$(realpath "${self}") +which -a "${base}" | while read -r fake; do + real=$(realpath "${fake}") + if [[ ${real} != ${self} ]]; then + "${real}" "$@" + break + fi +done +declare -a file +while [[ $# -ne 0 ]]; do + case "$1" in + (-s) shift;; + (-o) outp=$2; break;; + (*) file[${#file[@]}]=$1;; + esac; shift +done +if [[ -n "${outp}" ]]; then + ldid -T- "${outp}" +else + for mach in "${file[@]}"; do + ldid -T- "${mach}" + done +fi -- cgit v1.2.3