binary-collections 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/submodule +12 -3
- package/package.json +1 -1
package/bin/submodule
CHANGED
|
@@ -116,15 +116,24 @@ update_submodule() {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
remove_submodule() {
|
|
119
|
-
if [[ -z $
|
|
119
|
+
if [[ -z $2 || $2 == "" ]]; then
|
|
120
120
|
echo "input submodule path"
|
|
121
121
|
read folderpath
|
|
122
122
|
else
|
|
123
|
-
folderpath="$
|
|
123
|
+
folderpath="$2"
|
|
124
124
|
fi
|
|
125
125
|
|
|
126
|
+
if [ -z $folderpath ]; then
|
|
127
|
+
echo "Folder path is empty" ;
|
|
128
|
+
exit 1;
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
echo "removing submodule $folderpath"
|
|
132
|
+
|
|
126
133
|
# Remove the submodule entry from .git/config
|
|
127
|
-
|
|
134
|
+
if [ -d $folderpath ]; then
|
|
135
|
+
git submodule deinit -f $folderpath
|
|
136
|
+
fi
|
|
128
137
|
|
|
129
138
|
# Remove the submodule directory from the superproject's .git/modules directory
|
|
130
139
|
if [ -d ".git/modules/$folderpath" ]; then
|