######################################################
#
# BYLD: Build Your Linux Disk
# License: GPL2 (see LICENSE)
#
# (C) 1999-2000, Erich Roncarolo <erich@roncarolo.eu.org>
#

######################################################
#
# This is the Buildfile for the 'Joe' package.
# Usually Joe is linked as Editor.
#

function bf_log { echo "$@" >> $RLOG ; }

bf_log "--- Joe Package Buildfile ---"

######################
#
# Needed binary
#

# This command look for a file and put it in directory bin
bf_log "source Take root.root bin joe"
source Take root.root bin joe

##############################
#
# Needed configuration file
#

# This command look for a file list and put it in directory opt/lib
bf_log "source Take root.root opt/lib joerc "
source Take root.root opt/lib joerc

##############
#
# Profiles
#

source Take root.root etc/profile.d/ profile.joe
test -f etc/profile.d/.profiles && PNB=$(grep profile.joe etc/profile.d/.profiles)
if [ -z "$PNB" ] ; then
	echo "" >> etc/profile.d/.profiles
	echo "# Joe profile" >> etc/profile.d/.profiles
	echo "profile.joe" >> etc/profile.d/.profiles
fi
chown 0.0 etc/profile.d/.profiles
bf_log "Joe .profiles"
bf_log $(cat etc/profile.d/.profiles)

