forked from mold/core
Add tool to fetch config from Factory
This commit is contained in:
parent
d1b1a7440b
commit
54b5646b5a
7
Makefile
Normal file
7
Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
_config: getconfig
|
||||
./getconfig
|
||||
|
||||
pull:
|
||||
git submodule foreach git pull --ff-only
|
||||
|
||||
.PHONY: pull
|
1
_pbuild
1
_pbuild
@ -1,6 +1,5 @@
|
||||
<pbuild>
|
||||
<preset name="Tumbleweed" default>
|
||||
<config>tumbleweed</config>
|
||||
<repo>config:</repo>
|
||||
</preset>
|
||||
</pbuild>
|
||||
|
23
getconfig
Executable file
23
getconfig
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
version=$(curl -sf https://download.opensuse.org/history/latest)
|
||||
curl -s -f https://api.opensuse.org/public/source/openSUSE:Factory/_config > _config.factory
|
||||
curl -s -f https://api.opensuse.org/public/source/openSUSE:Factory:Rings:0-Bootstrap/_config > _config.ring0
|
||||
cat > _config.new << EOF
|
||||
%define _project openSUSE:Factory:Rings:0-Bootstrap
|
||||
|
||||
# for glibc
|
||||
%define disable_32bit 1
|
||||
Macros:
|
||||
%disable_32bit 1
|
||||
:Macros
|
||||
|
||||
EOF
|
||||
cat _config.factory _config.ring0 >> _config.new
|
||||
sed -i -e "/^RepoURL:/s,/tumbleweed,/history/$version/tumbleweed," _config.new
|
||||
|
||||
if [ -e _config ] && cmp -s _config.new _config; then
|
||||
rm _config.new
|
||||
else
|
||||
mv _config.new _config
|
||||
fi
|
2
removerepo
Executable file
2
removerepo
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sed -i -e 's/^RepoURL:/#RepoURL:/' _config
|
Loading…
Reference in New Issue
Block a user