[X2Go-Commits] [buildscripts] 02/03: bin/createsusetagsrepo: add actual initial metadata creation.

git-admin at x2go.org git-admin at x2go.org
Sat Oct 29 05:12:24 CEST 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit f2fd6db0f69e0dd6daad81033b4622b1409a45ef
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Oct 29 05:10:46 2016 +0200

    bin/createsusetagsrepo: add actual initial metadata creation.
---
 bin/createsusetagsrepo |   44 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/bin/createsusetagsrepo b/bin/createsusetagsrepo
index 1afab3a..27b12df 100755
--- a/bin/createsusetagsrepo
+++ b/bin/createsusetagsrepo
@@ -21,7 +21,7 @@ export PATH="${HOME}/bin:${PATH}"
 unset CDPATH
 
 usage () {
-  echo "Usage: $(basename "${0}") <top-directory-of-repository>" >&2
+  echo "Usage: $(basename "${0}") <top-directory-of-repository> <distro> <component>" >&2
   exit "1"
 }
 
@@ -30,12 +30,54 @@ error () {
   exit "1"
 }
 
+create_metadata () {
+  mkdir "media.1" "descr"
+
+  printf 'X2Go\n%(%Y%m%d%H%M%S)T\n1\n' '-1' > "media.1/media"
+  printf 'media\n' > "media.1/directory.yast"
+
+  typeset tmp_str=""
+  read -r -d '' tmp_str << EOF
+PRODUCT X2Go ${distro} ${component}
+VERSION 1.0-0
+LABEL X2Go ${component} Repository for ${distro}
+VENDOR X2Go
+ARCH.x86_64 x86_64 i686 i586 i486 i386 noarch
+ARCH.k1om k1om noarch
+ARCH.ppc64p7 ppc64p7 noarch
+ARCH.ppc64 ppc64 ppc noarch
+ARCH.ppc64le ppc64le noarch
+ARCH.ppc ppc noarch
+ARCH.sh4 sh4 noarch
+ARCH.m68k m68k noarch
+ARCH.aarch64 aarch64 aarch64_ilp32 noarch
+ARCH.aarch64_ilp32 aarch64_ilp32 noarch
+ARCH.armv4l arm       armv4l noarch
+ARCH.armv5l arm armel armv4l armv5l armv5tel noarch
+ARCH.armv6l arm armel armv4l armv5l armv5tel armv6l armv6vl armv6hl noarch
+ARCH.armv7l arm armel armv4l armv5l armv5tel armv6l armv6vl armv7l armv7hl noarch
+ARCH.i686 i686 i586 i486 i386 noarch
+ARCH.i586 i586 i486 i386 noarch
+DEFAULTBASE i586
+DESCRDIR descr
+DATADIR .
+EOF
+
+  printf '%s\n' "${tmp_str}" > "content"
+}
+
 set -e
 
 repo_top_dir="${1}"
 
+distro="${2:?"No distribution string provided."}"
+component="${2:?"No component string provided."}"
+
 test -n "${repo_top_dir}" || usage
 
 cd "${repo_top_dir}" || error "Unable to switch to provided repository top directory."
 
+create_metadata
+
+
 exit "0"

--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git


More information about the x2go-commits mailing list