From 6eb34304023bddd1751d247ab4e79fe1cec18f72 Mon Sep 17 00:00:00 2001 From: Tristan Williams Date: Mon, 14 Oct 2024 16:00:47 -0400 Subject: Change intended install dir to /usr/local/share instead of $HOME Having to clone for every user seems like a good way to get out of sync on all my accounts. Just put it in /usr/local/share and symlink to there instead of the old way. --- new-user-setup.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/new-user-setup.sh b/new-user-setup.sh index f734b96..113bfa4 100755 --- a/new-user-setup.sh +++ b/new-user-setup.sh @@ -7,9 +7,9 @@ # This script sets up a new account. As this is the dotfiles.core # installer, only things which apply to every account are done here. # -# This installer assumes that the dotfiles.core repository has been -# cloned into the $HOME directory under the name 'dotfiles.core'. It -# should be cloned and run this way for every new user. +# This installer assumes that: +# - the dotfiles.core repository has been cloned into /usr/local/share/ +# - the user has at least rx permissions for /usr/local/share/dotfiles.core/ # # This installer also assumes that dotfiles.sys and all necessary # packages have been installed. @@ -117,7 +117,7 @@ do true; done ## Put files into place ######################################################################## # File placement function -place_file () { +place_symlink () { file=$1 target=$2 if [[ -e $target ]]; then @@ -223,20 +223,20 @@ while place_directory $HOME/bin # Bash Configuration - place_file $HOME/dotfiles.core/home/.bash_profile $HOME/.bash_profile - place_file $HOME/dotfiles.core/home/.bashrc $HOME/.bashrc - place_file $HOME/dotfiles.core/home/.bash_aliases $HOME/.bash_aliases + place_symlink /usr/local/share/dotfiles.core/home/.bash_profile $HOME/.bash_profile + place_symlink /usr/local/share/dotfiles.core/home/.bashrc $HOME/.bashrc + place_symlink /usr/local/share/dotfiles.core/home/.bash_aliases $HOME/.bash_aliases # GPG Configuration place_directory $HOME/.gnupg/ - place_file $HOME/dotfiles.core/home/.gnupg/gpg-agent.conf $HOME/.gnupg/gpg-agent.conf + place_symlink /usr/local/share/dotfiles.core/home/.gnupg/gpg-agent.conf $HOME/.gnupg/gpg-agent.conf # Git configuration - place_file $HOME/dotfiles.core/home/.gitconfig $HOME/.gitconfig + place_symlink /usr/local/share/dotfiles.core/home/.gitconfig $HOME/.gitconfig echo -e "${WARN}WARNING: ~/.gitconfig.local should be placed manually${ENDCOLOR}" # Common Lisp SBCL Configuration - place_file $HOME/dotfiles.core/home/.sbclrc $HOME/.sbclrc + place_symlink /usr/local/share/dotfiles.core/home/.sbclrc $HOME/.sbclrc place_directory $HOME/lisp echo "INFO : Configuration files placed!" -- cgit v1.2.3