Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
password-store
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Karl Fogel
password-store
Commits
2ba85dad
Commit
2ba85dad
authored
10 years ago
by
Jason A. Donenfeld
Browse files
Options
Downloads
Patches
Plain Diff
makefile: allow platform files with gnu sed
Signed-off-by:
Jason A. Donenfeld
<
Jason@zx2c4.com
>
parent
658fe0ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+8
-7
8 additions, 7 deletions
Makefile
with
8 additions
and
7 deletions
Makefile
+
8
−
7
View file @
2ba85dad
...
...
@@ -6,14 +6,13 @@ MANDIR ?= $(PREFIX)/share/man
PLATFORMFILE
:=
src/platform/
$(
shell
uname
|
cut
-d
_
-f
1 |
tr
'[:upper:]'
'[:lower:]'
)
.sh
.PHONY
:
install uninstall install-
pass
.PHONY
:
install uninstall install-
common
all
:
@
echo
"Password store is a shell script, so there is nothing to do. Try
\"
make install
\"
instead."
install-
pass
:
install-
common
:
@
mkdir
-p
"
$(
DESTDIR
)$(
BINDIR
)
"
"
$(
DESTDIR
)$(
LIBDIR
)
"
"
$(
DESTDIR
)$(
MANDIR
)
/man1"
"
$(
DESTDIR
)$(
PREFIX
)
/share/bash-completion/completions/"
@
install
-m
0755
-v
src/password-store.sh
"
$(
DESTDIR
)$(
BINDIR
)
/pass"
@
install
-m
0644
-v
man/pass.1
"
$(
DESTDIR
)$(
MANDIR
)
/man1/pass.1"
@
install
-m
0644
-v
src/completion/pass.bash-completion
"
$(
DESTDIR
)$(
PREFIX
)
/share/bash-completion/completions/pass"
...
...
@@ -24,12 +23,14 @@ install-pass:
# @install -m 0644 -v src/completion/pass.fish-completion "$(DESTDIR)$(PREFIX)/share/fish/completions/pass.fish"
ifneq
($(strip $(wildcard $(PLATFORMFILE))),)
install
:
install-
pass
install
:
install-
common
@
install
-m
0644
-v
"
$(
PLATFORMFILE
)
"
"
$(
DESTDIR
)$(
LIBDIR
)
/password-store.platform.sh"
# The -i "" doesn't work on GNU, where the extra argument isn't needed. Fortuantely, platform file is for non-GNU only.
sed -i "" 's
:
.*platform-defined-functions.*:source $(DESTDIR)$(LIBDIR)/password-store.platform.sh:' "$(DESTDIR)$(BINDIR)/pass"
@
mkdir
-p
-v
"
$(
DESTDIR
)$(
BINDIR
)
/"
sed
's:.*platform-defined-functions.*:source
$(
DESTDIR
)$(
LIBDIR
)
/password-store.platform.sh:'
src/password-store.sh
>
"
$(
DESTDIR
)$(
BINDIR
)
/pass"
@
chmod
0755
"
$(
DESTDIR
)$(
BINDIR
)
/pass"
else
install
:
install-pass
install
:
install-common
@
install
-m
0755
-v
src/password-store.sh
"
$(
DESTDIR
)$(
BINDIR
)
/pass"
endif
uninstall
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment