summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
l---------util/arm-apple-darwin8-nmedit1
l---------util/arm-apple-darwin9-nmedit1
-rwxr-xr-xutil/nmedit30
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