Skip to content

Commit a81989c

Browse files
committed
Make venv-activate deploy useful bash prompts
1 parent 3d5c311 commit a81989c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

GNUmakefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
22
# GNU 'make' file
33
#
4+
SHELL = /bin/bash
45

56
# Change to your own Apple Developer ID, if you want to code-sign the resultant .app
67

@@ -93,8 +94,14 @@ $(LOCAL)/$(VENV_NAME):
9394
# start a sub-shell in that venv, with a CWD in the contained python-slip39 installation
9495
$(LOCAL)/$(VENV_NAME)-activate: $(LOCAL)/$(VENV_NAME)
9596
@echo; echo "*** Activating $@ VirtualEnv"
96-
[ -s $</start ] || echo ". $</bin/activate; cd $</$(GHUB_NAME)" > $</venv-activate.sh
97-
bash --init-file $</venv-activate.sh -i
97+
@[ -s $</venv-activate.sh ] || ( \
98+
echo "PS1='[\u@\h \W)]\\$$ '"; \
99+
echo "[ ! -r ~/.git-completion.bash ] || source ~/.git-completion.bash"; \
100+
echo "[ ! -r ~/.git-prompt.sh ] || source ~/.git-prompt.sh && PS1='[\u@\h \W\$$(__git_ps1 \" (%s)\")]\\$$ '"; \
101+
echo "source $</bin/activate"; \
102+
echo "cd $</$(GHUB_NAME)"; \
103+
) > $</venv-activate.sh
104+
@bash --init-file $</venv-activate.sh -i
98105

99106

100107
wheel: dist/slip39-$(VERSION)-py3-none-any.whl

0 commit comments

Comments
 (0)