aboutsummaryrefslogtreecommitdiffstats
path: root/bin/make_css_watch
diff options
context:
space:
mode:
Diffstat (limited to 'bin/make_css_watch')
-rwxr-xr-xbin/make_css_watch14
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/make_css_watch b/bin/make_css_watch
index d46ee8997..63a27a35e 100755
--- a/bin/make_css_watch
+++ b/bin/make_css_watch
@@ -2,8 +2,10 @@
use strict;
use warnings;
use feature 'say';
+use Cwd qw(abs_path);
use File::ChangeNotify;
use File::Find::Rule;
+use FindBin;
use Path::Tiny;
my @exts = qw/
@@ -24,6 +26,14 @@ my $watcher = File::ChangeNotify->instantiate_watcher(
filter => $filter,
);
+my $script_compass = 'compass';
+my $script_sass = 'sass';
+my $gem_bin = abs_path("$FindBin::Bin/../../gem-bin");
+if (-f "$gem_bin/compass") {
+ $script_compass = "$gem_bin/compass";
+ $script_sass = "$gem_bin/sass";
+}
+
sub title {
my $what = shift;
# TODO, check if xtitle is installed and if so, run following command:
@@ -61,13 +71,13 @@ while ( my @events = $watcher->wait_for_events() ) {
}
for my $dir (@update_dirs) {
if (-e "$dir/config.rb") {
- system compass =>
+ system $script_compass,
'compile',
'--output-style' => 'compressed',
$dir;
}
else {
- system sass =>
+ system $script_sass,
'--scss',
'--update',
'--style' => 'compressed',