diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0bc2e6d --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +_config: getconfig + ./getconfig + +pull: + git submodule foreach git pull --ff-only + +.PHONY: pull diff --git a/_pbuild b/_pbuild index 8accdc8..2cc16b5 100644 --- a/_pbuild +++ b/_pbuild @@ -1,6 +1,5 @@ - tumbleweed config: diff --git a/getconfig b/getconfig new file mode 100755 index 0000000..7afea88 --- /dev/null +++ b/getconfig @@ -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 diff --git a/removerepo b/removerepo new file mode 100755 index 0000000..8747529 --- /dev/null +++ b/removerepo @@ -0,0 +1,2 @@ +#!/bin/bash +sed -i -e 's/^RepoURL:/#RepoURL:/' _config