#!/bin/bash
#
# Welcome to the DTC install maker !
# This will produce the tarball package
# Maintainer: Thomas GOIRAND <thomas [ at ] goirand.fr>
# please do not ship with you packages
# this is only a small coder tool...
#

VERS=`cat version`
RELS=`cat release`
VERSION=$VERS"-"$RELS
UNIX_TYPE=gentoo
BUILD_DIR=dtc
DEST_DIR="dtc_"$VERSION"-gentoo"
ARCH_NAME=$DEST_DIR"_all.tar.gz"

CHECK_FOR_FAKEROOT=`which fakeroot`
if [ ! $? -eq 0 ]; then
	echo "Please emerge fakeroot"
	exit 1
fi

fakeroot ./buildGentoo ${UNIX_TYPE} ${BUILD_DIR} ${ARCH_NAME} ${DEST_DIR}

echo " -- Succesfully made "$ARCH_NAME" ---"
