add capability for bash dotfiles to be stored in /home/usr/.config/bash

This commit is contained in:
randomuser 2022-02-06 04:29:46 +00:00
parent 9bed5a6420
commit a9b3355daa
4 changed files with 19 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
environment

View File

@ -1,5 +1,5 @@
LOCATION="$(HOME)/.config" LOCATION="$(HOME)/.config"
install: install_bspwm install_nvim install_sx install_sxhkd install_vimb install_zathura install_wyebadblock install_simplestatus install: install_bspwm install_nvim install_sx install_sxhkd install_vimb install_zathura install_wyebadblock install_simplestatus environment
install_bspwm: install_bspwm:
cp -r bspwm $(LOCATION) cp -r bspwm $(LOCATION)
install_nvim: install_nvim:
@ -16,3 +16,5 @@ install_wyebadblock:
cp -r wyebadblock $(LOCATION) cp -r wyebadblock $(LOCATION)
install_simplestatus: install_simplestatus:
cp -r simplestatus $(LOCATION) cp -r simplestatus $(LOCATION)
environment:
sh environ

3
README
View File

@ -4,3 +4,6 @@ dot
dotfiles for randomuser dotfiles for randomuser
if they work, great if they work, great
if they don't, I don't care if they don't, I don't care
there's now a hack that allows you to have your bashrc
and profile in your $XDG_CONFIG_DIR, or ~/.config

12
environ Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -x
[ -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
set +x