public
Description: Interaction Service Plugin for chain.js
Homepage:
Clone URL: git://github.com/raid-ox/interaction.js.git
interaction.js / generate.sh
100644 39 lines (30 sloc) 0.786 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#
# Script to build interaction from parts
#
 
# Define paths
buildpath="./build"
srcpath="./src"
 
# Define target file
target="interaction.js"
 
# Define license file
license="license.txt"
 
# Define sources
sources=( core.js draggable.js droppable.js sortable.js selectable.js )
 
# Write watermark
echo "creating $buildpath/$target..."
echo "/* This file is automatically generated */" > "$buildpath/$target"
 
# Write license
nl="\\n"
echo "writing license..."
echo "\n/*\n\n`cat $license` \n\n*/" >> "$buildpath/$target"
 
# Do loop for each of sources
for source in ${sources[@]}
do
echo "writing $srcpath/$source..."
echo "\n/* $source */" >> "$buildpath/$target"
cat "$srcpath/$source" >> "$buildpath/$target"
echo "\n" >> "$buildpath/$target"
done
 
echo "done."
 
exit 0