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/"
|
||||
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)
|
||||
[[ "$link" ]] || continue
|
||||
if [[ $link ]]; then
|
||||
for file in "$tpath"/.[a-zA-Z]*; do
|
||||
if [[ -d $file && "${file##*/}" == .config ]]; then
|
||||
for subfile in "$file"/*; do
|
||||
|
@ -129,6 +118,18 @@ for topic in ${@:-$(find "$ENABLED_DIR" -maxdepth 1 -type l)}; do
|
|||
_link "$file" "$HOME/"
|
||||
fi
|
||||
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
|
||||
|
||||
# vim:set ft=sh:
|
||||
|
|
Loading…
Reference in a new issue