Add a fallback function to the config.sh in case the stowing failed but
the module is required.
This commit is contained in:
parent
413f560583
commit
3232beff25
2 changed files with 14 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ install_stower() {
|
||||||
--dir "${STOWERS_DIR}" \
|
--dir "${STOWERS_DIR}" \
|
||||||
--target "${TARGET_DIR}" \
|
--target "${TARGET_DIR}" \
|
||||||
--ignore "config.sh" "${stower_name}" || \
|
--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}] Failed to install!" >&2; return 1; }
|
||||||
|
|
||||||
echo "[+] [${stower_name}] Installed!"
|
echo "[+] [${stower_name}] Installed!"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
COMMAND_DEPS=("git")
|
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
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue