-
Notifications
You must be signed in to change notification settings - Fork 20
/
install_dependencies.sh
executable file
·49 lines (35 loc) · 1.47 KB
/
install_dependencies.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
#!/bin/bash
echo Deleting downloaded dependencies...
if [ -d "./dependencies" ]
then
rm -rf "./dependencies"
fi
if [ -d "./vendor" ]
then
rm -rf ./vendor
fi
echo Downloading repositories from composer...
composer install
composer update
echo Downloading repositories from git...
git clone https://github.com/stuartlangridge/sorttable.git ./vendor/sorttable
echo Downloading repositories from npm...
npm i chart.js sorttable trumbowyg --prefix ./vendor
echo Copying dist files from dependencies...
mkdir -p ./dependencies/jquery
cp ./vendor/components/jquery/jquery.min.js ./dependencies/jquery/jquery.min.js
mkdir ./dependencies/bootstrap
cp ./vendor/components/bootstrap/js/bootstrap.min.js ./dependencies/bootstrap/bootstrap.min.js
cp ./vendor/components/bootstrap/css/bootstrap.min.css ./dependencies/bootstrap/bootstrap.min.css
mkdir ./dependencies/mustache
cp -R ./vendor/mustache/mustache/src/Mustache/. ./dependencies/mustache
mkdir ./dependencies/chartjs
cp ./vendor/node_modules/chart.js/dist/chart.min.js ./dependencies/chartjs/chart.min.js
mkdir ./dependencies/sorttable
cp ./vendor/node_modules/sorttable/sorttable.js ./dependencies/sorttable/sorttable.js
mkdir ./dependencies/trumbowyg
cp ./vendor/node_modules/trumbowyg/dist/trumbowyg.min.js ./dependencies/trumbowyg/trumbowyg.min.js
cp ./vendor/node_modules/trumbowyg/dist/plugins/emoji/trumbowyg.emoji.min.js ./dependencies/trumbowyg/trumbowyg.emoji.min.js
echo Removing vendor folder...
rm -rf ./vendor
echo Build Successful