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"
|
LOCATION="$(HOME)/.config"
|
||||||
DATA="$(HOME)/.local/share"
|
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:
|
install_bspwm:
|
||||||
cp -r bspwm $(LOCATION)
|
cp -r bspwm $(LOCATION)
|
||||||
install_nvim:
|
install_nvim:
|
||||||
|
@ -21,5 +22,5 @@ install_ssh:
|
||||||
cp -r ssh $(LOCATION)
|
cp -r ssh $(LOCATION)
|
||||||
install_git:
|
install_git:
|
||||||
cp -r git $(LOCATION)
|
cp -r git $(LOCATION)
|
||||||
environment:
|
.environment:
|
||||||
sh environ
|
sh environ
|
||||||
|
|
3
environ
3
environ
|
@ -2,11 +2,12 @@
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
[ -f .environment ] && exit 2
|
||||||
[ -w /etc/bash.bashrc ] || exit 1
|
[ -w /etc/bash.bashrc ] || exit 1
|
||||||
[ -w /etc/profile ] || 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/bashrc ] && . $HOME/.config/bash/bashrc\n' >> /etc/bash.bashrc
|
||||||
printf '[ -f $HOME/.config/bash/profile ] && . $HOME/.config/bash/profile\n' >> /etc/profile
|
printf '[ -f $HOME/.config/bash/profile ] && . $HOME/.config/bash/profile\n' >> /etc/profile
|
||||||
touch environment
|
touch .environment
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
|
|
Loading…
Reference in New Issue