52 lines
844 B
Bash
Executable File
52 lines
844 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
files=".config/fish \
|
|
.config/git \
|
|
.config/omf \
|
|
.config/starship.toml \
|
|
.local/share/omf \
|
|
.emacs \
|
|
.tmux.conf.local"
|
|
|
|
|
|
function this_script_root_dir() {
|
|
dirname $(realpath ${BASH_SOURCE[0]})
|
|
}
|
|
|
|
function run() {
|
|
echo "$@"
|
|
$@
|
|
}
|
|
|
|
function load_gnome_terminal_profiles() {
|
|
if which dconf
|
|
then
|
|
run dconf load /org/gnome/terminal/legacy/profiles:/ < $(this_script_root_dir)/gnome-terminal-profiles.dconf
|
|
fi
|
|
}
|
|
|
|
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
|
|
load_gnome_terminal_profiles
|
|
}
|
|
|
|
|
|
pushd $(this_script_root_dir)
|
|
git pull
|
|
git submodule init
|
|
git submodule update
|
|
popd
|
|
install_home
|