33 lines
450 B
Bash
Executable File
33 lines
450 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
files=".config/fish \
|
|
.config/git .config/omf .config/starship .tmux.conf .local/share/omf"
|
|
|
|
|
|
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
|
|
}
|
|
|
|
install_home
|