iamthedeveloper 558 Bytes
Newer Older
1 2 3 4
#!/bin/sh

git config remote.origin.pushurl git@gitlab.labs.nic.cz:turris/openwrt.git

5
for i in $(find feeds/ -maxdepth 1 -type d -regex '[a-zA-Z/]+'); do
6 7 8 9 10 11 12 13 14 15 16 17 18
    (
    cd $i; 
    REMOTE=`git config remote.origin.url`;
    if  `echo $REMOTE | grep -Eq '^https:\/\/gitlab\.labs\.nic\.cz\/turris.*'` ; then
       echo -n "Set push url for $i from: $REMOTE to: "
       NEWURL=`echo $REMOTE | sed 's/^https\:\/\/gitlab.labs.nic.cz\/turris/git@gitlab.labs.nic.cz:turris/g'` 
       echo $NEWURL
       git config remote.origin.pushurl $NEWURL
    fi;
    )
done