#!/bin/sh

#   Copyright (C) 2004 Peter Conrad <conrad@tivano.de>

#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License (version 2) as
#   published by the Free Software Foundation.

#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.

#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

if [ $# != 1 ]; then
    echo "Usage: $0 <dir>" 1>&2
    exit 1
fi

unset `env | grep -v '^PATH=' | grep -v '\.MAKE\.LEVEL\.ENV' | grep -v 'PKG_BUILD_OPTIONS' | sed 's/=.*//'`

for i in $1/*; do
    if [ -r $i ]; then
	j=`basename $i`
	export $j=`cat $i`
    fi
done

# Do not change the following line:
# arch-tag: fa670935-2044-4714-ace6-b9e35e7c9e9e
