1
0
Fork 0
mirror of https://github.com/kou029w/dotfiles.git synced 2025-01-18 16:07:59 +00:00

fixed cd failure case

This commit is contained in:
Nebel 2023-12-29 23:51:12 +09:00
parent 4c6df9c4c3
commit 805f92774c
Signed by: nebel
GPG key ID: 79807D08C6EF6460

View file

@ -7,7 +7,7 @@ function install_dotfiles() {
dotfile=$(realpath "$dotfile") dotfile=$(realpath "$dotfile")
( (
cd -- "$home" cd -- "$home" || exit 1
ln -svf "$dotfile" . ln -svf "$dotfile" .
) )
done done
@ -20,8 +20,8 @@ function install_apt_packages() {
eval "$(apt-config shell apt_sources_dir 'Dir::Etc::sourceparts/d')" eval "$(apt-config shell apt_sources_dir 'Dir::Etc::sourceparts/d')"
rsync -rv etc/apt/keyrings/ /usr/share/keyrings/ rsync -rv etc/apt/keyrings/ /usr/share/keyrings/
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir" rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
[[ -d etc/default ]] \ [[ -d etc/default ]] &&
&& rsync -rv etc/default/ /etc/default/ rsync -rv etc/default/ /etc/default/
apt update apt update
apt install -y "${packages[@]}" apt install -y "${packages[@]}"
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir" rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
@ -31,7 +31,7 @@ function install_addons() {
local addon local addon
for addon in "$@"; do for addon in "$@"; do
( (
cd -- "$addon" cd -- "$addon" || exit 1
./install ./install
) )
done done