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:
parent
4c6df9c4c3
commit
805f92774c
1 changed files with 4 additions and 4 deletions
8
mod.bash
8
mod.bash
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue