-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (23 loc) · 864 Bytes
/
Makefile
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
BUILD_DIR = build
DIST_NAME = cricinfo-tweaks
FF_DIST_NAME = $(DIST_NAME)-firefox.zip
CHROME_DIST_NAME = $(DIST_NAME)-chrome.zip
all: firefox chrome
clean:
@if [ -d "${BUILD_DIR}" ]; then rm -r "${BUILD_DIR}"; fi
@if [ -f "${FF_DIST_NAME}" ]; then rm "${FF_DIST_NAME}"; fi
@if [ -f "${CHROME_DIST_NAME}" ]; then rm "${CHROME_DIST_NAME}"; fi
firefox: clean
mkdir "${BUILD_DIR}"
cp manifest-firefox.json "${BUILD_DIR}"/manifest.json
cp cricinfo_graph_tweaks.js "${BUILD_DIR}"/
cp chart.umd.min.js "${BUILD_DIR}"/
cd "${BUILD_DIR}" && zip -r "../${FF_DIST_NAME}" . && cd ..
rm -r "${BUILD_DIR}"
chrome: clean
mkdir "${BUILD_DIR}"
cp manifest-chrome.json "${BUILD_DIR}"/manifest.json
cp cricinfo_graph_tweaks.js "${BUILD_DIR}"/
cp chart.umd.min.js "${BUILD_DIR}"/
cd "${BUILD_DIR}" && zip -r "../${CHROME_DIST_NAME}" . && cd ..
rm -r "${BUILD_DIR}"