modify
This commit is contained in:
15
func.sh
15
func.sh
@@ -4,20 +4,17 @@ function sub_akt() {
|
|||||||
#$1 ist Branch
|
#$1 ist Branch
|
||||||
#$2 neue URLD
|
#$2 neue URLD
|
||||||
new_sub_url="$2"
|
new_sub_url="$2"
|
||||||
pro_be_cut=${new_sub_url##*/}
|
git checkout $1
|
||||||
sub_name=${pro_be_cut::-4}
|
|
||||||
old_sub_path=""
|
|
||||||
#echo "git checkout $1"
|
|
||||||
i=0
|
i=0
|
||||||
for path_check in $(git config --file=.gitmodules --get-regexp path|awk '{print $2}'); do
|
for path_check in $(git config --file=.gitmodules --get-regexp path|awk '{print $2}'); do
|
||||||
new_sub_path="$3"
|
new_sub_path="$3"
|
||||||
if [ $path_check = $new_sub_path ]; then
|
if [ $path_check = $new_sub_path ]; then
|
||||||
echo "$path_check = $new_sub_path"
|
echo "$path_check = $new_sub_path"
|
||||||
#echo "git submodule set-url $sub_name $new_sub_url"
|
git submodule set-url $path_check "$new_sub_url"
|
||||||
#echo "git submodule update --init --recursive --remote $sub_name"
|
git submodule update --init --recursive --remote $path_check
|
||||||
#echo "git add .gitmodules"
|
git add .gitmodules
|
||||||
#echo "git commit -m 'Submodul aktualisiert'"
|
git commit -m 'Submodul aktualisiert'
|
||||||
#echo "git push"
|
git push
|
||||||
else
|
else
|
||||||
echo "keine übereinstimmung"
|
echo "keine übereinstimmung"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user