-
Notifications
You must be signed in to change notification settings - Fork 2
/
make.sh
executable file
·55 lines (48 loc) · 1.2 KB
/
make.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
#! /usr/bin/env bash
. ./config.sh
if [ -z "${TASSEL_NAME}" ]; then
echo "TASSEL_NAME is a required variable"
exit 1
fi
if [ -z "${TASSEL_VERSION}" ]; then
echo "TASSEL_VERSION is a required variable"
exit 2
fi
if [ -z "${TASSEL_DESC}" ]; then
echo "TASSEL_DESC is a required variable"
exit 3
fi
if [ -z "${TASSEL_HOME}" ]; then
echo "TASSEL_HOME is a required variable"
exit 4
fi
if [ -z ${TASSEL_ICON} ]; then
TASSEL_ICON="tassel"
fi
manifest='{
"browser_specific_settings": {
"gecko": {
"id": "'"${TASSEL_NAME}"'@'"${TASSEL_HOST}"'",
"strict_min_version": "100.0"
}
},
"manifest_version": 2,
"name": "'"${TASSEL_NAME}"'",
"version": "'"${TASSEL_VERSION}"'",
"description": "'"${TASSEL_DESC}"'",
"homepage_url": "'"${TASSEL_HOME}"'",
"icons": {
"48": "icons/'"${TASSEL_ICON}"'.png",
"96": "icons/'"${TASSEL_ICON}"'@2x.png"
},
"permissions": [
"bookmarks",
"management"
],
"background": {
"scripts": ["background.js"]
}
}
'
echo $manifest | jq | tee manifest.json
zip "${TASSEL_NAME}" background.js manifest.json bookmarks.json LICENSE icons &>/dev/null