chroot-exec () { if [ $(mount |grep -c $buildrootpath/dev) -eq 0 ]; then setupBindmounts fi chroot $buildrootpath $@ } chroot-aptinstall () { if [ $(mount |grep -c $buildrootpath/dev) -eq 0 ]; then setupBindmounts fi chroot $buildrootpath aptitude install -y $@ }