main chld/mwakat / util / lib.sh
 1#!/bin/sh
 2
 3m=${m:-/mnt}
 4
 5__hhc(){
 6	# determine if host has needed command
 7	u=''
 8	if command -v $1 >/dev/null 2>&1; 
 9		then u="$1"
10	elif test -e $m/bin/$1 >/dev/null 2>&1; 
11		then u="$m/bin/$1" 
12	fi
13}
14
15_inc(){
16	__hhc chroot
17
18	$u $m /bin/sh -e -c "$*"
19	# usage: _inc '
20	#	touch mwakat
21	# '
22}