forked from dhowe/AdNauseam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy-common-files.sh
30 lines (24 loc) · 933 Bytes
/
copy-common-files.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
#!/usr/bin/env bash
#
# This script assumes a linux environment
DES=$1
UBLOCK=$( cat dist/version ) # ADN:ublock-version
bash ./tools/make-assets.sh $DES
bash ./tools/make-locales.sh $DES
cp -R src/css $DES/
cp -R src/img $DES/
cp -R src/js $DES/
cp -R src/lib $DES/
cp -R src/web_accessible_resources $DES/
# cp -R src/_locales $DES/
cp src/*.html $DES/
cp platform/common/*.js $DES/js/
cp platform/chromium/*.html $DES/
cp platform/common/*.json $DES/
cp manifest.json $DES/ # use ADN manifest, not ublock's
cp LICENSE.txt $DES/
# ADN
awk -v s=$UBLOCK '{gsub(/{UBLOCK_VERSION}/, s)}1' $DES/links.html > /tmp/links.html && mv /tmp/links.html $DES/links.html
# Remove the following files
rm $DES/js/adn/tests.js
rm -R $DES/lib/qunit