summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-03-05 13:31:38 -0500
committerB Stack <bgstack15@gmail.com>2020-03-05 13:31:38 -0500
commit333f8f5d88d06e8a45d69b2463fb1a78c765eb29 (patch)
treedc774dedc2f48118118afce5ec021b9272bf5680
parentrewrite obsmirror again (diff)
downloadformer-gists-333f8f5d88d06e8a45d69b2463fb1a78c765eb29.tar.gz
former-gists-333f8f5d88d06e8a45d69b2463fb1a78c765eb29.tar.bz2
former-gists-333f8f5d88d06e8a45d69b2463fb1a78c765eb29.zip
load most headers from obs Release file
-rwxr-xr-xobsmirror.sh/obsmirror.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/obsmirror.sh/obsmirror.sh b/obsmirror.sh/obsmirror.sh
index 2b6522c..1b878d7 100755
--- a/obsmirror.sh/obsmirror.sh
+++ b/obsmirror.sh/obsmirror.sh
@@ -91,9 +91,12 @@ test -n "${VERBOSE}" && unset wget_verbose
# create the Release file
PKGS="$(wc -c Packages)"
PKGS_GZ="$(wc -c Packages.gz)"
+ old_headers1="$( grep -E '^(Archive|Codename|Origin|Label|Architectures):' Release )"
+ old_headers2="$( grep -E '^(Description):' Release )"
cat <<EOF > Release
-Architectures: all
+${old_headers1}
Date: $(date -u '+%a, %d %b %Y %T %Z')
+${old_headers2}
MD5Sum:
$(md5sum Packages | cut -d" " -f1) $PKGS
$(md5sum Packages.gz | cut -d" " -f1) $PKGS_GZ
bgstack15