summaryrefslogtreecommitdiffstats
path: root/multiarch-dispatch
blob: db98f1db8290427ddac2c22cd68d1f2ef8a5348c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#---------------------------------------------------------------
# Project         : Mandrakelinux
# Module          : multiarch-utils
# File            : multiarch-dispatch
# Version         : $Id$
# Author          : Gwenole Beauchesne
# Created On      : Wed Jan 12 12:38:53 EST 2005
#---------------------------------------------------------------

if [[ "$0" = "/usr/bin/multiarch-dispatch" ]]; then
    echo "Helper script to dispatch a binary under a specific personality"
    exit 0
fi

bin=`dirname $0`/`multiarch-platform`/${0##*/}

if [[ -x "$bin" ]]; then
    echo "Cannot execute $bin" > /dev/stderr
    exit 1
fi

exec $bin ${1+"$@"}