improve environ installation script

This commit is contained in:
randomuser 2022-06-07 23:13:10 -05:00
parent 3fa80b84c9
commit e2b44e8ea2
3 changed files with 6 additions and 4 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
environment .environment

View File

@ -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

View File

@ -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