Skip to content

Commit

Permalink
First implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
timanovsky committed Jun 16, 2017
1 parent c7340e2 commit 332724d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# bin/compile <build-dir> <cache-dir> <env-dir>

BUILD_DIR=${1:-}
CACHE_DIR=${2:-}
ENV_DIR=${3:-}

if [ -f $ENV_DIR/BUILDPACK_PATH ]; then
BUILDPACK_PATH =`cat $ENV_DIR/BUILDPACK_PATH`
if [ -d $BUILD_DIR/$BUILDPACK_PATH ]; then
echo "-----> Subdir buildpack in " + $BUILDPACK_PATH
echo " creating cache: " + $CACHE_DIR
mkdir -p $CACHE_DIR
echo " moving working dir: " + $BUILDPACK_PATH + " to cache"
TMP_DIR = `mktemp -d $CACHE_DIR/subdirXXXXX`
cp -R $BUILD_DIR/$BUILDPACK_PATH/ $TMP_DIR
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
cp -R $TMP_DIR/ $BUILD_DIR/
ls $BUILD_DIR
exit 0
fi
fi


5 changes: 5 additions & 0 deletions bin/detect
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# bin/detect <build-dir>

echo "Subdir buildpack"
exit 0
3 changes: 3 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

echo "--- {}"

0 comments on commit 332724d

Please sign in to comment.