aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrtz12 <koenig@fagott.pw>2016-01-25 20:03:19 (UTC)
committerrtz12 <koenig@fagott.pw>2016-01-25 20:03:19 (UTC)
commit1e1d91541ef3caa848b8c9296e29dc12e744ed1c (patch)
treea19e2c4b5a37ea8c30f360e9e97e32c6dfd2ce68 /bin
parentd4b2422fd753df71be58d1a499194849b6e6d438 (diff)
Dependency-Analyse im Makefile
Hiermit werden die JavaScript-Dateien auch neu gebaut, wenn ge"import"ete Dateien geaendert werden.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/generate-dependencies12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/generate-dependencies b/bin/generate-dependencies
new file mode 100755
index 0000000..937412e
--- /dev/null
+++ b/bin/generate-dependencies
@@ -0,0 +1,12 @@
1#!/bin/bash
2{
3 path="${2%/*}"
4 echo -n "$1: $2 "
5 deps=`grep import "$2" | grep -Po "['\"]\./.*?['\"]" | sed 's/.\(.*\)./\1/'`
6 for dep in $deps; do
7 echo -n "$path/$dep.js "
8 done
9 echo -n '
10
11'
12} > "$3"