Do escaping using regexps with /g instead
[UnFlowedThunderbird/ThunderGit.git] / Makefile
blob19fde6e0b97f4db0585a987fd16f32b7c782e107
1 TARGET=thundergit
3 XPI_FILES=chrome.manifest install.rdf readme.txt \
4 $(wildcard content/* locale/*/* skin/* defaults/*/*)
6 ID=$(shell sed -n -e 's/^.*<em:id>\(.*\)<\/em:id>.*/\1/p' -e '/em:name/q' \
7 < install.rdf)
9 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
10 ifneq (,$(findstring MINGW,$(uname_S)))
11 APPDATA=$(USERPROFILE)/Application Data/Thunderbird/Profiles
12 PROFILE_DIRECTORY=$(shell sh -c 'echo "$(APPDATA)"/*.default')
13 else
14 ifeq (,$(shell ls -d "$(HOME)/.mozilla-thunderbird" 2>/dev/null))
15 TBDIR=$(HOME)/.thunderbird
16 else
17 TBDIR=$(HOME)/.mozilla-thunderbird
18 endif
19 PROFILE_DIRECTORY=$(wildcard $(TBDIR)/*.default)
20 endif
22 $(TARGET).xpi: $(XPI_FILES)
23 zip -9r $@ $^
25 symlink:
26 ln -s "$(shell pwd)" "$(PROFILE_DIRECTORY)/extensions/$(ID)"
28 install: symlink
30 uninstall:
31 rm -rf "$(PROFILE_DIRECTORY)/extensions/$(ID)"
33 reinstall: uninstall install