#!@GOOD_SHELL@

AXIOM=./axp

BBLD=@BBLD@
FASLEXT=@FASLEXT@

PROG=$BBLD/interpsys

CDIR=.

# Phase 1

echo Phase 1
# DAASE=/mnt/a10/pom/pp/axiom/axp4/ax-build1/

DAASE=$CDIR/r1
(export AXIOM DAASE; \
 echo ')read "boo1.input"' | $PROG)

# Phase 2

echo Phase 2

DAASE=$CDIR/r2

mkdir -p $DAASE/algebra
mv browse.daase  category.daase  compress.daase  interp.daase \
     operation.daase $DAASE/algebra || exit 1

for A in *.NRLIB; do
  B=${A%.NRLIB};
  cp $A/$B.${FASLEXT} ${AXIOM}/algebra/$B.${FASLEXT} ;
done || exit 1

(export AXIOM DAASE; \
 echo ')read "boo2.input"' | $PROG)


# Phase 3

echo Phase 3

DAASE=$CDIR/r3
mkdir -p $DAASE/algebra

mv browse.daase  category.daase  compress.daase  interp.daase \
     operation.daase $DAASE/algebra || exit 1

for A in *.NRLIB; do 
  B=${A%.NRLIB}; 
  cp $A/$B.${FASLEXT} ${AXIOM}/algebra/$B.${FASLEXT} ; 
done || exit 1

(export AXIOM DAASE; \
 echo ')read "boo3.input"' | $PROG)

# Phase 4

echo Phase 4

DAASE=$CDIR/r4

mkdir -p $DAASE/algebra
mv browse.daase  category.daase  compress.daase  interp.daase \
     operation.daase $DAASE/algebra || exit 1

for A in *.NRLIB; do
  B=${A%.NRLIB};
  cp $A/$B.${FASLEXT} ${AXIOM}/algebra/$B.${FASLEXT} ;
done || exit 1

(export AXIOM DAASE; \
 echo ')read "boo4.input"' | $PROG)

# Phase 5

echo Phase 5

DAASE=$CDIR/r5

mkdir -p $DAASE/algebra
mv browse.daase  category.daase  compress.daase  interp.daase \
     operation.daase $DAASE/algebra || exit 1

for A in *.NRLIB; do
  B=${A%.NRLIB};
  cp $A/$B.${FASLEXT} ${AXIOM}/algebra/$B.${FASLEXT} ;
done || exit 1


(export AXIOM DAASE; \
 echo ')read "boo5.input"' | $PROG)

# Phase 6

echo Phase 6

DAASE=$CDIR/r6

mkdir -p $DAASE/algebra
mv browse.daase  category.daase  compress.daase  interp.daase \
     operation.daase $DAASE/algebra || exit 1

for A in *.NRLIB; do
  B=${A%.NRLIB};
  cp $A/$B.${FASLEXT} ${AXIOM}/algebra/$B.${FASLEXT} ;
done || exit 1

(export AXIOM DAASE; \
 echo ')read "boo6.input"' | $PROG)

DAASE=$CDIR/r7

mkdir -p $DAASE/algebra
mv browse.daase  category.daase  compress.daase  interp.daase \
     operation.daase $DAASE/algebra || exit 1

