From 6fb97bfcb357820fdc38e3912fe8b69244cd85c6 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 29 Jan 2019 10:16:00 +0100 Subject: [PATCH] local/bin/homeinit: Use USER_NAME variable --- .local/bin/homeinit | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.local/bin/homeinit b/.local/bin/homeinit index a65d48f8..767433bd 100755 --- a/.local/bin/homeinit +++ b/.local/bin/homeinit @@ -8,6 +8,7 @@ HTTPS_ROOT=https://gitlab.com/ SSH_ROOT=git@gitlab.com: ROOT=$HTTPS_ROOT PROFILE=/tmp/homeinit-$USER/homeinit +USER_NAME=Ambrevar [ -z "$SOURCEDIR" ] && SOURCEDIR="$HOME/personal" [ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config" @@ -127,12 +128,12 @@ EOF if [ -e "$SOURCEDIR" ]; then git -C "$SOURCEDIR" pull else - git clone ${SSH_ROOT}Ambrevar/personal ~/personal + git clone ${SSH_ROOT}$USER_NAME/personal ~/personal fi if [ -e ~/.password-store ]; then git -C ~/.password-store pull else - git clone ${SSH_ROOT}Ambrevar/password-store ~/.password-store + git clone ${SSH_ROOT}$USER_NAME/password-store ~/.password-store ## The following is necessary to make sure the 'diff' GPG filter is properly set up. pass git init fi @@ -147,10 +148,10 @@ done section "dotfiles" if [ -e ~/dotfiles ]; then - git -C ~/dotfiles remote set-url origin ${ROOT}Ambrevar/dotfiles + git -C ~/dotfiles remote set-url origin ${ROOT}$USER_NAME/dotfiles git -C ~/dotfiles pull else - git clone ${ROOT}Ambrevar/dotfiles ~/dotfiles || exit 1 + git clone ${ROOT}$USER_NAME/dotfiles ~/dotfiles || exit 1 fi pushd ~/dotfiles ## .bash_profile may prevent .profile from being parsed, so we move it. @@ -291,8 +292,8 @@ if inpath guix; then rm -rv "$(dirname "$PROFILE")" fi -section "locate db" if [ -x ~/.local/bin/updatedb-local ]; then + section "locate db" ~/.local/bin/updatedb-local fi