-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild-chrome.sh
executable file
·43 lines (35 loc) · 1.09 KB
/
build-chrome.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
#!/bin/sh
echo "\nGetting github dependencies...\n==============================\n"
if [ ! -d "./github" ]; then
mkdir github
fi
cd github
# Get correct version of qrcode.js
if [ ! -d "qrcode" ]; then
git clone https://github.com/davidshimjs/qrcodejs
fi
cd qrcodejs
git checkout 04f46c6a0708418cb7b96fc563eacae0fbf77674
cd ..
cd ..
echo "\nCopying github dependencies...\n==============================\n"
if [ ! -d "./lib/js/deps" ]; then
mkdir ./lib/js/deps
fi
if [ ! -d "./lib/js/deps/qrcode" ]; then
mkdir ./lib/js/deps/qrcode
fi
cp github/qrcodejs/qrcode.min.js lib/js/deps/qrcode/.
cp github/qrcodejs/LICENSE lib/js/deps/qrcode/.
echo "\nSyncing chrome directory...\n===========================\n"
if [ ! -d "./build" ]; then
mkdir ./build
fi
if [ ! -d "./build/chrome" ]; then
mkdir ./build/chrome
fi
rsync -a --exclude-from=./exclude-chrome.txt . build/chrome/. --delete-after
echo "\nZipping chrome extension...\n===========================\n"
mv build/chrome.zip build/chrome-old.zip
zip -r build/chrome.zip build/chrome
echo "\n========\n > Extension located in ./build/chrome.zip\n"