diff --git a/common/.local/bin/dotsync b/common/.local/bin/dotsync index e98d90a5..be78f1a4 100755 --- a/common/.local/bin/dotsync +++ b/common/.local/bin/dotsync @@ -12,11 +12,17 @@ stow_git() { multi_stow() { ret=0 - for package in common "$(hostname)"; do - [ -n "$package" ] && [ -e "${STOW_DIR}/${package}" ] && { - stow --no-folding -d "$STOW_DIR" -t "$HOME" "$@" "$package" - ret=$((ret + $?)) - } + + hostname=$(hostname) + if [ -e "${STOW_DIR}/$hostname" ]; then + host_package=$hostname + else + host_package="fallback" + fi + + for package in common ${host_package}; do + stow --no-folding -d "$STOW_DIR" -t "$HOME" "$@" "$package" + ret=$((ret + $?)) done return $ret }