Created
November 24, 2021 23:31
-
-
Save thistleknot/6f782d9f8ddf21debe00dadd969c5db4 to your computer and use it in GitHub Desktop.
appendProxyRepos
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/bash | |
proxy="replaceme" | |
for file in *.repo; do | |
echo $file | |
for name in $(grep '\[*\]' $file | sed 's/[][]//g'); do | |
echo $name | |
sed "/^\[$name\]/a\{$proxy}" $file | sed 's/[{}]//g' >> temp-$file | |
done | |
mv -f temp-$file $file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment