#!/bin/sh

. config/options $1

mkdir -p $INSTALL/usr/bin
  cp $PKG_BUILD/dropbearmulti $INSTALL/usr/bin/
    ln -sf dropbearmulti $INSTALL/usr/bin/dbclient
    ln -sf dropbearmulti $INSTALL/usr/bin/dropbearconvert
    ln -sf dropbearmulti $INSTALL/usr/bin/dropbearkey
    ln -sf dropbearmulti $INSTALL/usr/bin/ssh
  cp $PKG_BUILD/scp $INSTALL/usr/bin

mkdir -p $INSTALL/usr/sbin
  ln -sf ../bin/dropbearmulti $INSTALL/usr/sbin/dropbear

mkdir -p $INSTALL/etc
  ln -s /storage/.cache/dropbear $INSTALL/etc/dropbear

if [ -f $PROJECT_DIR/$PROJECT/ssh/known_hosts ]; then
  mkdir -p $INSTALL/etc/ssh
  cp $PROJECT_DIR/$PROJECT/ssh/known_hosts $INSTALL/etc/ssh
fi
