Skip to content

Commit

Permalink
Add -c flag to git ls-files.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Dec 11, 2012
1 parent 1627234 commit ce2f80a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ chmod +x boot.sh
# but since the PHP buildpack moves everything out of $BUILD_DIR into
# www/ we can't rely on that implementation and need to duplicate it here.

if [ "$(cd $BUILD_DIR/www && git ls-files -o -i --exclude-from=.slugignore 2> /dev/null)" != "" ]; then
echo "-----> Deleting files matching .slugignore patterns."
if [ -r $BUILD_DIR/www/.slugignore ]; then
unset GIT_DIR
cd www
git ls-files -z -o -i --exclude-from=.slugignore | xargs -0 rm
if [ "$(git ls-files -c -o -i --exclude-from=.slugignore)" != "" ]; then
echo "-----> Deleting files matching .slugignore patterns."
git ls-files -z -c -o -i --exclude-from=.slugignore | xargs -0 rm
fi
cd ..
fi

Expand Down

0 comments on commit ce2f80a

Please sign in to comment.