-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·42 lines (34 loc) · 1020 Bytes
/
package.sh
File metadata and controls
executable file
·42 lines (34 loc) · 1020 Bytes
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
#!/bin/bash
# Package script for Open in Gmail extension
# Creates a .xpi file (which is just a renamed zip file)
set -e
EXTENSION_NAME="open-in-gmail"
VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('manifest.json','utf8')).version)")
OUTPUT_FILE="${EXTENSION_NAME}.xpi"
echo "Packaging ${EXTENSION_NAME} v${VERSION}..."
# Remove old package if it exists
if [ -f "${OUTPUT_FILE}" ]; then
echo "Removing old package..."
rm "${OUTPUT_FILE}"
fi
# Create the package
echo "Creating package..."
zip -r "${OUTPUT_FILE}" \
manifest.json \
background.js \
icons/*.png \
-x "*.DS_Store" \
-x "__MACOSX/*"
# Verify the package
echo ""
echo "Package contents:"
unzip -l "${OUTPUT_FILE}"
echo ""
echo "✓ Package created successfully: ${OUTPUT_FILE}"
echo ""
echo "To install:"
echo "1. Open Thunderbird"
echo "2. Go to Tools > Add-ons and Themes (Cmd+Shift+A)"
echo "3. Click the gear icon and select 'Install Add-on From File...'"
echo "4. Select ${OUTPUT_FILE}"
echo ""