local/bin/homeinit: Use USER_NAME variable
parent
f31868b783
commit
6fb97bfcb3
|
@ -8,6 +8,7 @@ HTTPS_ROOT=https://gitlab.com/
|
||||||
SSH_ROOT=git@gitlab.com:
|
SSH_ROOT=git@gitlab.com:
|
||||||
ROOT=$HTTPS_ROOT
|
ROOT=$HTTPS_ROOT
|
||||||
PROFILE=/tmp/homeinit-$USER/homeinit
|
PROFILE=/tmp/homeinit-$USER/homeinit
|
||||||
|
USER_NAME=Ambrevar
|
||||||
|
|
||||||
[ -z "$SOURCEDIR" ] && SOURCEDIR="$HOME/personal"
|
[ -z "$SOURCEDIR" ] && SOURCEDIR="$HOME/personal"
|
||||||
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
|
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
|
||||||
|
@ -127,12 +128,12 @@ EOF
|
||||||
if [ -e "$SOURCEDIR" ]; then
|
if [ -e "$SOURCEDIR" ]; then
|
||||||
git -C "$SOURCEDIR" pull
|
git -C "$SOURCEDIR" pull
|
||||||
else
|
else
|
||||||
git clone ${SSH_ROOT}Ambrevar/personal ~/personal
|
git clone ${SSH_ROOT}$USER_NAME/personal ~/personal
|
||||||
fi
|
fi
|
||||||
if [ -e ~/.password-store ]; then
|
if [ -e ~/.password-store ]; then
|
||||||
git -C ~/.password-store pull
|
git -C ~/.password-store pull
|
||||||
else
|
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.
|
## The following is necessary to make sure the 'diff' GPG filter is properly set up.
|
||||||
pass git init
|
pass git init
|
||||||
fi
|
fi
|
||||||
|
@ -147,10 +148,10 @@ done
|
||||||
|
|
||||||
section "dotfiles"
|
section "dotfiles"
|
||||||
if [ -e ~/dotfiles ]; then
|
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
|
git -C ~/dotfiles pull
|
||||||
else
|
else
|
||||||
git clone ${ROOT}Ambrevar/dotfiles ~/dotfiles || exit 1
|
git clone ${ROOT}$USER_NAME/dotfiles ~/dotfiles || exit 1
|
||||||
fi
|
fi
|
||||||
pushd ~/dotfiles
|
pushd ~/dotfiles
|
||||||
## .bash_profile may prevent .profile from being parsed, so we move it.
|
## .bash_profile may prevent .profile from being parsed, so we move it.
|
||||||
|
@ -291,8 +292,8 @@ if inpath guix; then
|
||||||
rm -rv "$(dirname "$PROFILE")"
|
rm -rv "$(dirname "$PROFILE")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
section "locate db"
|
|
||||||
if [ -x ~/.local/bin/updatedb-local ]; then
|
if [ -x ~/.local/bin/updatedb-local ]; then
|
||||||
|
section "locate db"
|
||||||
~/.local/bin/updatedb-local
|
~/.local/bin/updatedb-local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue