Skip to content
Snippets Groups Projects
Commit 3cb2d812 authored by Fred Wright's avatar Fred Wright Committed by Christopher Nielsen
Browse files

Add tool to obtain architectures of a program.

This is used to build a program with the same architecture(s) as
a specified program (default /usr/bin/true).
parent 7ab30e4d
Branches
No related tags found
No related merge requests found
#! /bin/bash
# Get architectures for system programs.
# NOTE: Currently needed to build 'which' on 10.4.
REFPROG="${1:-/usr/bin/true}"
ARCHS="$(file $REFPROG | grep ' executable ' | sed 's|.* executable ||')"
ARCHFLAGS="$(for a in $ARCHS; do echo -n ' -arch' $a; done)"
echo $ARCHFLAGS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment