From e2b44e8ea275db19b1aea3f54e4e7a7b40aa4f14 Mon Sep 17 00:00:00 2001 From: randomuser Date: Tue, 7 Jun 2022 23:13:10 -0500 Subject: [PATCH] improve environ installation script --- .gitignore | 2 +- Makefile | 5 +++-- environ | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d554f94..7d219f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -environment +.environment diff --git a/Makefile b/Makefile index 76e58fa..3fe2dc4 100644 --- a/Makefile +++ b/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 diff --git a/environ b/environ index 882d54d..9e0b683 100755 --- a/environ +++ b/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