#!/bin/bash

cd $SRC_DIR/bin

binaries="\
gustaf \
gustaf_mate_joining \
"
mkdir -p $PREFIX/bin

for i in $binaries; do cp $SRC_DIR/bin/$i $PREFIX/bin/$i && chmod a+x $PREFIX/bin/$i; done

#!/bin/bash

BINARY_HOME=$PREFIX/bin
PKG_HOME=$PREFIX/opt/$PKG_NAME-$PKG_VERSION

cd $SRC_DIR/bin

binaries="\
gustaf \
gustaf_mate_joining \
"
mkdir -p $PREFIX/bin
mkdir -p $PKG_HOME

for i in $binaries; do cp $SRC_DIR/bin/$i $PKG_HOME/$i && chmod a+x $PKG_HOME/$i && ln -s $PKG_HOME/$i $BINARY_HOME/$i; done

--- 
+++ 
@@ -1,4 +1,7 @@
 #!/bin/bash
+
+BINARY_HOME=$PREFIX/bin
+PKG_HOME=$PREFIX/opt/$PKG_NAME-$PKG_VERSION
 
 cd $SRC_DIR/bin
 
@@ -7,5 +10,6 @@
 gustaf_mate_joining \
 "
 mkdir -p $PREFIX/bin
+mkdir -p $PKG_HOME
 
-for i in $binaries; do cp $SRC_DIR/bin/$i $PREFIX/bin/$i && chmod a+x $PREFIX/bin/$i; done
+for i in $binaries; do cp $SRC_DIR/bin/$i $PKG_HOME/$i && chmod a+x $PKG_HOME/$i && ln -s $PKG_HOME/$i $BINARY_HOME/$i; done
Copy binaries directly to /bin
