summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sassw6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/sassw b/bin/sassw
index e580f02..f936346 100755
--- a/bin/sassw
+++ b/bin/sassw
@@ -7,6 +7,7 @@
# (output will automatically be INPUT with .scss changed to .css)
import json
+import glob
import os
import pyinotify
import subprocess
@@ -14,6 +15,11 @@ import sys
import time
filename = sys.argv[1]
+if os.path.isdir(filename):
+ scss_filenames = [x for x in os.listdir(filename) if x.startswith('_') and x.endswith('.scss')]
+ if not scss_filenames:
+ print('Error: directory specified but no proper scss file within.', file=sys.stderr)
+ filename = os.path.join(filename, scss_filenames[0])
def build():
global sources, directories