forked from davglass/nodejs-yui3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_package.sh
executable file
·55 lines (46 loc) · 1.17 KB
/
make_package.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
pack=$1;
case $1 in
base|bare|full) ;;
*) echo "Invalid Package Name"; exit 1;;
esac
echo "Making YUI3 $pack package"
if test -d ./build/$pack; then
rm -rRf ./build/$pack
fi
dir="./build/$pack/"
mkdir -p $dir
cp README.* $dir
wait
cp LICENSE $dir
wait
cp -R lib $dir
wait
#Copy yui3-yui3.js into main file
echo "" >> $dir/lib/node-yui3.js
echo "" >> $dir/lib/node-yui3.js
echo "/**" >> $dir/lib/node-yui3.js
echo " Imported from ./lib/yui3-yui3.js" >> $dir/lib/node-yui3.js
echo "**/" >> $dir/lib/node-yui3.js
echo "" >> $dir/lib/node-yui3.js
echo "" >> $dir/lib/node-yui3.js
cat $dir/lib/yui3-yui3.js >> $dir/lib/node-yui3.js
wait
rm $dir/lib/yui3-yui3.js
#Copy RLS into main file
echo "" >> $dir/lib/node-yui3.js
echo "" >> $dir/lib/node-yui3.js
echo "/**" >> $dir/lib/node-yui3.js
echo " Imported from ./lib/yui3-rls.js" >> $dir/lib/node-yui3.js
echo "**/" >> $dir/lib/node-yui3.js
echo "" >> $dir/lib/node-yui3.js
echo "" >> $dir/lib/node-yui3.js
cat $dir/lib/yui3-rls.js >> $dir/lib/node-yui3.js
wait
rm $dir/lib/yui3-rls.js
wait
cp ./packages/$pack-package.json ${dir}package.json
wait
./scripts/merge_package_json.js $pack
wait
echo "Build Complete: $dir"