File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,11 @@ init() {
88
88
exit 1
89
89
fi
90
90
91
- export GIT_DIR=" ${SHC_PREFIX_DIR} /.git"
92
- export GIT_WORK_TREE=" ${SHC_PREFIX_DIR} "
91
+ unset GIT_DIR GIT_WORK_TREE
93
92
94
- if [ ! -d " ${GIT_DIR} " ]; then
93
+ cd " ${RUNTIME_EXECUTABLE_DIRECTORY} "
94
+
95
+ if [ ! -d " ${RUNTIME_EXECUTABLE_DIRECTORY} /.git" ]; then
95
96
printf " ERROR: git repository doesn't exist, you must initialize a git repository before running this script\\ n" 1>&2
96
97
exit " ${COMMON_RESULT_FAILURE} "
97
98
fi
@@ -102,16 +103,11 @@ init() {
102
103
git submodule init\
103
104
" ${SDC_CLEAN_FILTER_FOR_BASH_DIR} "
104
105
git submodule update --depth=30
105
- local GIT_DIR_OLD=" ${GIT_DIR} "
106
- local GIT_WORK_TREE_OLD=" ${GIT_WORK_TREE} "
107
- GIT_DIR=" ${SDC_CLEAN_FILTER_FOR_BASH_DIR} /.git"
108
- GIT_WORK_TREE=" ${SDC_CLEAN_FILTER_FOR_BASH_DIR} "
106
+
109
107
pushd " ${SDC_CLEAN_FILTER_FOR_BASH_DIR} " > /dev/null
110
108
git submodule init
111
109
# FIXME: Should be specifying this in the submodule
112
110
git submodule update ' Code Formatters and Beautifiers/the Bash Script Beautifier'
113
- GIT_DIR=" ${GIT_DIR_OLD} " ; unset GIT_DIR_OLD
114
- GIT_WORK_TREE=" ${GIT_WORK_TREE_OLD} " ; unset GIT_WORK_TREE_OLD
115
111
popd > /dev/null
116
112
printf ' done\n'
117
113
You can’t perform that action at this time.
0 commit comments