Created
February 23, 2022 01:32
-
-
Save BenSYZ/c18179a4e97dde32c8f1a10df9a90b1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while read line;do | |
echo $line | |
cd $line | |
repo_name=$(git remote -v |grep -E '.*https://aur.tuna.tsinghua.edu.cn/.*' |awk '{print $2}' |head -n1 |awk -v FS='/' '{print $4}') | |
if [[ "$repo_name" != "" ]];then | |
git remote set-url origin https://aur.archlinux.org/$repo_name | |
#git remote -v |head -n1 | |
#echo https://aur.archlinux.org/$repo_name | |
#echo ====== | |
fi | |
cd .. | |
done <<<$(find . -maxdepth 1 -type d|grep -v '^.$') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment