#!/bin/sh
set -x
set -v
PREFIX=/apps/jasspa
# PREFIX=/opt/jasspa
PREFIX=/apps
umask 022
export PREFIX
# rm -rf $PREFIX/*
sudo mkdir -p $PREFIX/bin
sudo chown -R pi.pi $PREFIX
tar xfz jasspa-mesrc-20060909-2.tar.gz
thisPlace=`pwd`
export thisPlace
chmod -R u+w .
cd me060909/src
cp ../../emain.h ../../linux26c.gmk .
chmod 0755 build
# ./build -C
# ./cleanUp.sh
# ./build -t c -m freebsd.gmk
# make -f sunos5.gmk spotless
make -f linux26c.gmk spotless
# make -f openbsd.gmk spotless
# ./build -t c -m sunos5.gmk
./build -t c -m linux26c.gmk
# ./build -t c -m openbsd.gmk
cp mec $PREFIX/bin
ln $PREFIX/bin/mec $PREFIX/bin/me
cd $thisPlace
gzip -d < jasspa-metree-20060909-2.tar.gz | tar xfvo -
mv jasspa/* $PREFIX
rm -rf jasspa
cd $thisPlace
rm -rf me060909


