diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-19 23:29:33 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-19 23:29:33 +0200 |
commit | 78098bab96c0228d700978492152ba3c2a872d2b (patch) | |
tree | a36a4fafc22b3af76205882ea224b540a6d82637 /Makefile | |
parent | e4d479a3fd695ced2cf7f1e9bdf6f8c3a4ad51ed (diff) |
platform: Allow custom platform file before install
The new environment variable, PASSWORD_STORE_PLATFORM_FILE is now used
for loading custom platform files while pass lives as
src/password-store.sh. After it is installed using 'make install', this
environment variable is no longer used, and either no platform file is
loaded (if the default platform is acceptable), or a hardcoded
also-installed platform file is referenced.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -26,11 +26,13 @@ ifneq ($(strip $(wildcard $(PLATFORMFILE))),) install: install-common @install -m 0644 -v "$(PLATFORMFILE)" "$(DESTDIR)$(LIBDIR)/password-store.platform.sh" @mkdir -p -v "$(DESTDIR)$(BINDIR)/" - sed 's:.*platform-defined-functions.*:source $(DESTDIR)$(LIBDIR)/password-store.platform.sh:' src/password-store.sh > "$(DESTDIR)$(BINDIR)/pass" + sed 's:.*PASSWORD_STORE_PLATFORM_FILE.*:source "$(DESTDIR)$(LIBDIR)/password-store.platform.sh":' src/password-store.sh > "$(DESTDIR)$(BINDIR)/pass" @chmod 0755 "$(DESTDIR)$(BINDIR)/pass" else install: install-common - @install -m 0755 -v src/password-store.sh "$(DESTDIR)$(BINDIR)/pass" + @mkdir -p -v "$(DESTDIR)$(BINDIR)/" + sed '/PASSWORD_STORE_PLATFORM_FILE/d' src/password-store.sh > "$(DESTDIR)$(BINDIR)/pass" + @chmod 0755 "$(DESTDIR)$(BINDIR)/pass" endif uninstall: |