summaryrefslogtreecommitdiff
path: root/util/nmedit
diff options
context:
space:
mode:
Diffstat (limited to 'util/nmedit')
-rwxr-xr-xutil/nmedit30
1 files changed, 30 insertions, 0 deletions
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