#!/bin/sh -e

cd "$(realpath -- $(dirname "$0"))"
. ./config

mkdir -p "$BINDIR"
cp -f bin/nncp "$BINDIR"
chmod 755 "$BINDIR"/nncp
for cmd in `cat cmd.list` ; do
    ln -fs nncp "$BINDIR"/$cmd
done

mkdir -p "$INFODIR"
cp -f doc/nncp.info "$INFODIR"
chmod 644 "$INFODIR"/nncp.info

mkdir -p "$DOCDIR"
cp -f -L AUTHORS NEWS NEWS.RU README README.RU THANKS $DOCDIR
chmod 644 "$DOCDIR"/*
