bootstrap: link first, then run install/update scripts
This commit is contained in:
parent
061c25f4fc
commit
284deecd2c
25
bootstrap
25
bootstrap
|
@ -105,19 +105,8 @@ for topic in ${@:-$(find "$ENABLED_DIR" -maxdepth 1 -type l)}; do
|
||||||
[[ "$link" && -x "$bin" ]] && _link "$bin" "$HOME/.bin/"
|
[[ "$link" && -x "$bin" ]] && _link "$bin" "$HOME/.bin/"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Link topic to .enabled.d
|
|
||||||
if [[ -h "$ENABLED_DIR/$tname" ]]; then
|
|
||||||
[[ "$update" && -x $tpath/update ]] && _run "$tpath/update"
|
|
||||||
else
|
|
||||||
# Register topic as 'enabled'
|
|
||||||
_run ln -svf "$tpath" "$ENABLED_DIR/$tname"
|
|
||||||
|
|
||||||
# Run install script
|
|
||||||
[[ "$install" && -x $tpath/install ]] && _run "$tpath/install"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Symlink dotfiles from topic directories (2 levels deep)
|
# Symlink dotfiles from topic directories (2 levels deep)
|
||||||
[[ "$link" ]] || continue
|
if [[ $link ]]; then
|
||||||
for file in "$tpath"/.[a-zA-Z]*; do
|
for file in "$tpath"/.[a-zA-Z]*; do
|
||||||
if [[ -d $file && "${file##*/}" == .config ]]; then
|
if [[ -d $file && "${file##*/}" == .config ]]; then
|
||||||
for subfile in "$file"/*; do
|
for subfile in "$file"/*; do
|
||||||
|
@ -129,6 +118,18 @@ for topic in ${@:-$(find "$ENABLED_DIR" -maxdepth 1 -type l)}; do
|
||||||
_link "$file" "$HOME/"
|
_link "$file" "$HOME/"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Link topic to .enabled.d
|
||||||
|
if [[ -h "$ENABLED_DIR/$tname" ]]; then
|
||||||
|
[[ "$update" && -x $tpath/update ]] && _run "$tpath/update"
|
||||||
|
else
|
||||||
|
# Register topic as 'enabled'
|
||||||
|
_run ln -svf "$tpath" "$ENABLED_DIR/$tname"
|
||||||
|
|
||||||
|
# Run install script
|
||||||
|
[[ "$install" && -x $tpath/install ]] && _run "$tpath/install"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# vim:set ft=sh:
|
# vim:set ft=sh:
|
||||||
|
|
Loading…
Reference in a new issue