From 0d4b4cf0e58aefc1d144ba983fa441363b1822ab Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Thu, 22 Feb 2018 19:07:20 +0000 Subject: [PATCH] NEW Allow files to have a .tmpl extension which is stripped --- src/RecipeInstaller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/RecipeInstaller.php b/src/RecipeInstaller.php index d14b999..2975a98 100644 --- a/src/RecipeInstaller.php +++ b/src/RecipeInstaller.php @@ -44,6 +44,10 @@ class RecipeInstaller extends LibraryInstaller { $any = false; foreach($fileIterator as $path => $info) { $destination = $destinationRoot . substr($path, strlen($sourceRoot)); + $extension = pathinfo($destination, PATHINFO_EXTENSION); + if ($extension === 'tmpl') { + $destination = substr($destination, -5); + } $relativePath = substr($path, strlen($sourceRoot) + 1); // Name path without leading '/' // Write header