mirror of
https://github.com/pnx/dotfiles
synced 2026-07-02 14:33:40 +02:00
install.sh: fix a bug where symlinks where created in the target directory instead of updating the existing symlink
This commit is contained in:
parent
fdb300ad9b
commit
9a0b0c60b0
1 changed files with 12 additions and 11 deletions
23
install.sh
23
install.sh
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
LN="ln -snfr"
|
||||||
BASE_PATH=$(dirname $(readlink -f $BASH_SOURCE))
|
BASE_PATH=$(dirname $(readlink -f $BASH_SOURCE))
|
||||||
|
|
||||||
DIRECTORIES=(
|
DIRECTORIES=(
|
||||||
|
|
@ -21,20 +22,20 @@ DIRECTORIES=(
|
||||||
)
|
)
|
||||||
|
|
||||||
for target in ${DIRECTORIES[@]}; do
|
for target in ${DIRECTORIES[@]}; do
|
||||||
ln -sfr -t $HOME/.config $BASE_PATH/$target
|
$LN -t $HOME/.config $BASE_PATH/$target
|
||||||
done
|
done
|
||||||
|
|
||||||
ln -sfr $BASE_PATH/bash/bashrc $HOME/.bashrc
|
$LN $BASE_PATH/bash/bashrc $HOME/.bashrc
|
||||||
ln -sfr $BASE_PATH/bash/bashrc.d $HOME/.bashrc.d
|
$LN $BASE_PATH/bash/bashrc.d/ $HOME/.bashrc.d
|
||||||
ln -sfr $BASE_PATH/tmux/config.conf $HOME/.tmux.conf
|
$LN $BASE_PATH/tmux/config.conf $HOME/.tmux.conf
|
||||||
ln -sfr $BASE_PATH/Xresources $HOME/.Xresources
|
$LN $BASE_PATH/Xresources $HOME/.Xresources
|
||||||
ln -sfr $BASE_PATH/picom.conf $HOME/.config/picom.conf
|
$LN $BASE_PATH/picom.conf $HOME/.config/picom.conf
|
||||||
ln -sfr $BASE_PATH/fzfrc $HOME/.config/fzfrc
|
$LN $BASE_PATH/fzfrc $HOME/.config/fzfrc
|
||||||
ln -sfr $BASE_PATH/git/config $HOME/.gitconfig
|
$LN $BASE_PATH/git/config $HOME/.gitconfig
|
||||||
ln -sfr $BASE_PATH/git/conf.d/ $HOME/.config/git
|
$LN $BASE_PATH/git/conf.d/ $HOME/.config/git
|
||||||
|
|
||||||
mkdir -p $HOME/bin
|
mkdir -p $HOME/bin
|
||||||
ln -sfr $BASE_PATH/scripts/tmuxs/main.sh $HOME/bin/tmuxs
|
$LN $BASE_PATH/scripts/tmuxs/main.sh $HOME/bin/tmuxs
|
||||||
for script in $(find $BASE_PATH/scripts -maxdepth 1 -type f); do
|
for script in $(find $BASE_PATH/scripts -maxdepth 1 -type f); do
|
||||||
ln -sfr $script $HOME/bin/$(basename $script)
|
$LN $script $HOME/bin/$(basename $script)
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue