improve environ installation script
This commit is contained in:
parent
3fa80b84c9
commit
e2b44e8ea2
|
@ -1 +1 @@
|
|||
environment
|
||||
.environment
|
||||
|
|
5
Makefile
5
Makefile
|
@ -1,6 +1,7 @@
|
|||
LOCATION="$(HOME)/.config"
|
||||
DATA="$(HOME)/.local/share"
|
||||
install: install_bspwm install_nvim install_sx install_sxhkd install_zathura install_simplestatus install_bash install_ssh install_git environment
|
||||
install_local: install_bspwm install_nvim install_sx install_sxhkd install_zathura install_simplestatus install_bash install_ssh install_git
|
||||
install: .environment
|
||||
install_bspwm:
|
||||
cp -r bspwm $(LOCATION)
|
||||
install_nvim:
|
||||
|
@ -21,5 +22,5 @@ install_ssh:
|
|||
cp -r ssh $(LOCATION)
|
||||
install_git:
|
||||
cp -r git $(LOCATION)
|
||||
environment:
|
||||
.environment:
|
||||
sh environ
|
||||
|
|
3
environ
3
environ
|
@ -2,11 +2,12 @@
|
|||
|
||||
set -x
|
||||
|
||||
[ -f .environment ] && exit 2
|
||||
[ -w /etc/bash.bashrc ] || exit 1
|
||||
[ -w /etc/profile ] || exit 1
|
||||
|
||||
printf '[ -f $HOME/.config/bash/bashrc ] && . $HOME/.config/bash/bashrc\n' >> /etc/bash.bashrc
|
||||
printf '[ -f $HOME/.config/bash/profile ] && . $HOME/.config/bash/profile\n' >> /etc/profile
|
||||
touch environment
|
||||
touch .environment
|
||||
|
||||
set +x
|
||||
|
|
Loading…
Reference in New Issue