40 lines
556 B
Bash
Executable File
40 lines
556 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
files=".config/fish \
|
|
.config/git \
|
|
.config/omf \
|
|
.config/starship \
|
|
.tmux.conf \
|
|
.local/share/omf \
|
|
.emacs \
|
|
.tmux.conf.local"
|
|
|
|
|
|
function this_script_root_dir() {
|
|
dirname $(realpath ${BASH_SOURCE[0]})
|
|
}
|
|
|
|
function run() {
|
|
echo "$@"
|
|
$@
|
|
}
|
|
|
|
|
|
function install_home() {
|
|
for f in $files
|
|
do
|
|
run rm -Rf $HOME/$f
|
|
dir=$(dirname $f)
|
|
if [ ! "$dir" = "." ]
|
|
then
|
|
run mkdir -p $HOME/$dir
|
|
fi
|
|
run ln -sf $(this_script_root_dir)/$f $HOME/$f
|
|
done
|
|
run ln -sf $(this_script_root_dir)/.tmux/.tmux.conf $HOME/.tmux.conf
|
|
}
|
|
|
|
install_home
|