Darryl Gregorash composed on 2021-10-28 00:48 (UTC-0600):
Felix Miata wrote:
Axel Braun composed on 2021-10-28 08:16 (UTC+0200):
sed -i -e 's/15.2/\$releasever/g' /etc/zypp/repos.d/*.repo
does the job quite convenient But why? What advantage is there to a long-winded variable over a short literal?
Do you enjoy editing the repo urls every time you do a version upgrade? I don't.
There's nothing to enjoy or not. I run a sed command once per Leap release …/Suse/153# sed -i 's/15.2/15.3/g' *.repo* then stamp them with a timestamp visually equal to the releasever, and copy the set from my LAN server to each installation, which is typically upwards of 20. Any time I see a timestamp on a repo file that isn't as I made it, it's something to investigate: /etc/zypp/repos.d# ls -Gg *repo -rw-r--r-- 1 137 Jun 2 15:03 Libdvdcss.repo -rw-r--r-- 1 268 Jun 2 15:03 Mozilla.repo -rw-r--r-- 1 153 Jun 2 15:03 NonOSS.repo -rw-r--r-- 1 143 Jun 2 15:03 OSS.repo -rw-r--r-- 1 255 Jun 2 15:03 PackmanE.repo -rw-r--r-- 1 176 Jun 2 15:03 TDEnoarch.repo -rw-r--r-- 1 164 Jun 2 15:03 TDE.repo -rw-r--r-- 1 240 Jul 27 15:03 UpdateBP.repo -rw-r--r-- 1 129 Jun 2 15:03 Update.repo -rw-r--r-- 1 135 Jun 2 15:03 UpdateSLE.repo -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata