config_dir=$lbpath/util/newconfig
yapps2_py=$config_dir/yapps2.py
config_g=$config_dir/config.g
-config_py=$config_lb/config.py
if [ ! -d $target_dir ]; then
echo "Target directory not found"
if [ ! -f $config_lb ]; then
config_lb=$1/Config.lb
fi
-
if [ ! -f $config_lb ]; then
echo "No target config file found"
echo "Tried both $1 and $config_lb"
exit 1
fi
+target_subdir=`sed -n -e 's/^target \(.*\)$/\1/p' $config_lb`
+target_subdir=`dirname $config_lb`/$target_subdir
+config_py=$target_subdir/config.py
+
+if [ ! -d $target_subdir ] ; then
+ mkdir -p $target_subdir
+fi
if [ ! -f $config_py ]; then
echo "No linuxbios config script found. Rebuilding it.."
$PYTHON $yapps2_py $config_g $config_py