diff --git a/install.sh b/install.sh index fe6fb04..22e79ba 100755 --- a/install.sh +++ b/install.sh @@ -44,6 +44,7 @@ install_stower() { --dir "${STOWERS_DIR}" \ --target "${TARGET_DIR}" \ --ignore "config.sh" "${stower_name}" || \ + { [[ "$(type -t fallback)" == "function" ]] && fallback "${stower_dir}" "${TARGET_DIR}"; } || \ { echo "[!] [${stower_name}] Failed to install!" >&2; return 1; } echo "[+] [${stower_name}] Installed!" diff --git a/stowers/git/config.sh b/stowers/git/config.sh index 8ea9ae7..2fe01b8 100644 --- a/stowers/git/config.sh +++ b/stowers/git/config.sh @@ -1,3 +1,16 @@ #!/bin/bash COMMAND_DEPS=("git") + +fallback() { + local stower_dir target_dir + stower_dir="$1" + target_dir="$2" + + git config --global user.name "Hans Goor" + git config --global user.email "me@eyedevelop.org" + git config --global commit.gpgSign true + git config --global push.autoSetupRemote true + git config --global init.defaultBranch main + git config --global pull.rebase true +}