Skip to content

Commit 1506d9e

Browse files
committed
#158: Symlink component assets as well
1 parent 93ea686 commit 1506d9e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/Joomlatools/Console/Symlinkers/joomlatools-framework.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,25 @@
6363
}
6464
}
6565

66+
// Component assets
67+
$results = glob($project.'/code/libraries/joomlatools-components/*/resources/assets', GLOB_ONLYDIR);
68+
69+
foreach ($results as $from)
70+
{
71+
$component = preg_replace('#^.*?joomlatools-components/([^/]+)/resources/assets#', '$1', $from);
72+
$to = Util::buildTargetPath('/media/koowa/com_'.$component, $destination);
73+
74+
if (!$component || is_link($to)) {
75+
continue;
76+
}
77+
78+
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
79+
$output->writeln(" * creating link `$to` -> $from");
80+
}
81+
82+
`ln -sf $from $to`;
83+
}
84+
6685
// Let the default symlinker handle the rest
6786
return false;
6887
});

0 commit comments

Comments
 (0)