@@ -65,7 +65,9 @@ declare -Ar META_RUNTIME_DEPENDENCIES_CRITICAL=(
65
65
)
66
66
67
67
# ## These are the dependencies that are used later and also checked later
68
- declare -Ar META_RUNTIME_DEPENDENCIES=()
68
+ declare -Ar META_RUNTIME_DEPENDENCIES=(
69
+ [pre-commit]=" pre-commit - A framework for managing and maintaining multi-language pre-commit hooks"
70
+ )
69
71
# # #################### End of META_RUNTIME_DEPENDENCIES ######################
70
72
71
73
# ## Program's Commandline Options Definitions
@@ -96,16 +98,10 @@ init() {
96
98
97
99
printf ' Fetching submodules..'
98
100
# shellcheck disable=SC1090
99
- source " ${SDC_GIT_HOOKS_DIR} /SOFTWARE_DIRECTORY_CONFIGURATION.source"
100
- # shellcheck disable=SC1090
101
101
source " ${SDC_GIT_FILTERS_DIR} /SOFTWARE_DIRECTORY_CONFIGURATION.source"
102
- # shellcheck disable=SC1090
103
- source " ${SDC_LINTERS_DIR} /SOFTWARE_DIRECTORY_CONFIGURATION.source"
104
102
git submodule init\
105
- " ${SDC_GIT_PRECOMMIT_HOOK_FOR_BASH_DIR} " \
106
- " ${SDC_BASH_AUTOMATIC_CHECKING_FOR_GIT} " \
107
103
" ${SDC_CLEAN_FILTER_FOR_BASH_DIR} "
108
- git submodule update
104
+ git submodule update --depth=30
109
105
local GIT_DIR_OLD=" ${GIT_DIR} "
110
106
local GIT_WORK_TREE_OLD=" ${GIT_WORK_TREE} "
111
107
GIT_DIR=" ${SDC_CLEAN_FILTER_FOR_BASH_DIR} /.git"
@@ -120,24 +116,7 @@ init() {
120
116
printf ' done\n'
121
117
122
118
printf ' Setting pre-commit hook...'
123
- if ! [ -v SDC_GIT_HOOKS_DIR ]; then
124
- printf ' %s: Error: Unable to locate Git Hooks directory' " ${RUNTIME_SCRIPT_FILENAME} " 1>&2
125
- exit 1
126
- fi
127
- # SOFTWARE_DIRECTORY_CONFIGURATION.source is scope of Flexible Software Installation Specification
128
- # shellcheck disable=SC1090
129
- if ! [ -v SDC_GIT_PRECOMMIT_HOOK_FOR_BASH_DIR ]\
130
- || [ -z " ${SDC_GIT_PRECOMMIT_HOOK_FOR_BASH_DIR} " ]; then
131
- printf ' %s: Error: Unable to locate Git Precommit Hooks for Bash directory' " ${RUNTIME_SCRIPT_FILENAME} " 1>&2
132
- exit 1
133
- fi
134
- ln\
135
- --symbolic\
136
- --relative\
137
- --force\
138
- " ${SDC_GIT_PRECOMMIT_HOOK_FOR_BASH_DIR} /Git Pre-commit Hook for GNU Bash Projects.bash" \
139
- " ${SHC_PREFIX_DIR} " /.git/hooks/pre-commit\
140
- && printf ' done\n'
119
+ pre-commit install
141
120
142
121
printf ' Setting project-specific git configurations...'
143
122
git config include.path ../.gitconfig && printf ' done.\n'
@@ -860,7 +839,7 @@ meta_fsis_setup_application_metadata
860
839
861
840
# # This script is based on the GNU Bash Shell Script Template project
862
841
# # https://github.com/Lin-Buo-Ren/GNU-Bash-Shell-Script-Template
863
- # # and is based on the following version:
842
+ # # and is based on the following version:
864
843
# # GNU_BASH_SHELL_SCRIPT_TEMPLATE_VERSION=@@GBSST_VERSION@@
865
844
# # You may rebase your script to incorporate new features and fixes from the template
866
845
0 commit comments