diff options
author | Jay Freeman <saurik@saurik.com> | 2008-06-28 18:45:02 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-06-28 18:45:02 +0000 |
commit | ecc34bcfbf6fedbd87f34c8b1b263e2aa8141abd (patch) | |
tree | e3851afc1137d8fc43d773fa238823e07a862ba6 /util | |
parent | 56af309dadc4a25af2cb5f31b55202de39c7ed6c (diff) |
Made nmedit deterministic.
git-svn-id: http://svn.telesphoreo.org/trunk@345 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'util')
l--------- | util/arm-apple-darwin8-nmedit | 1 | ||||
l--------- | util/arm-apple-darwin9-nmedit | 1 | ||||
-rwxr-xr-x | util/nmedit | 30 |
3 files changed, 32 insertions, 0 deletions
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 |