This repository has been archived by the owner on Dec 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 287
/
create.sh
executable file
·70 lines (58 loc) · 1.92 KB
/
create.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
set -e
CI_VERSION=3.1.7
LODASH_VERSION=4.17.5
BOOTSTRAP_VERSION=3.3.7
FA_VERSION=4.7.0
CI_REST_VERSION=3.0.3
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
BUILD_DIR=${DIR}/CodeIgniter-Bootstrap
# PRE
rm -rf ${BUILD_DIR}
rm -rf .tmp
mkdir .tmp
pushd .tmp
# CODEIGNITER
wget https://github.com/bcit-ci/CodeIgniter/archive/${CI_VERSION}.zip -O codeigniter.zip
unzip codeigniter.zip
mv CodeIgniter-${CI_VERSION} ${BUILD_DIR}
mkdir ${BUILD_DIR}/assets
mkdir ${BUILD_DIR}/assets/js
mkdir ${BUILD_DIR}/assets/css
mkdir ${BUILD_DIR}/assets/fonts
# LODASH
wget https://raw.githubusercontent.com/lodash/lodash/${LODASH_VERSION}/dist/lodash.min.js
mv lodash.min.js ${BUILD_DIR}/assets/js
# BOOTSTRAP
wget https://github.com/twbs/bootstrap/releases/download/v${BOOTSTRAP_VERSION}/bootstrap-${BOOTSTRAP_VERSION}-dist.zip
unzip bootstrap-${BOOTSTRAP_VERSION}-dist.zip
pushd bootstrap-${BOOTSTRAP_VERSION}-dist
mv css/bootstrap.css.map ${BUILD_DIR}/assets/css
mv css/bootstrap.min.css ${BUILD_DIR}/assets/css
mv fonts/* ${BUILD_DIR}/assets/fonts
mv js/bootstrap.min.js ${BUILD_DIR}/assets/js
popd
# FONT AWESOME
wget https://fontawesome.com/v${FA_VERSION}/assets/font-awesome-${FA_VERSION}.zip -O font-awesome.zip
unzip font-awesome.zip
pushd font-awesome-${FA_VERSION}
mv css/* ${BUILD_DIR}/assets/css
mv fonts/* ${BUILD_DIR}/assets/fonts
popd
# CI REST SERVER
wget https://github.com/chriskacerguis/codeigniter-restserver/archive/${CI_REST_VERSION}.zip -O codeigniter-restserver.zip
unzip codeigniter-restserver.zip
pushd codeigniter-restserver-${CI_REST_VERSION}
mv application/libraries/Format.php ${BUILD_DIR}/application/libraries
mv application/libraries/REST_Controller.php ${BUILD_DIR}/application/libraries
mv application/config/rest.php ${BUILD_DIR}/application/config
popd
# POST
popd
# COPY
rsync -av ${DIR}/files/ ${BUILD_DIR}/
# ARCHIVE
zip -r CodeIgniter-Bootstrap.zip CodeIgniter-Bootstrap
# CLEANUP
rm -rf .tmp
rm -rf ${BUILD_DIR}