Win Admin: Added script to create stable toolchain prj. in OBS
authorKlaas Freitag <freitag@owncloud.com>
Thu, 21 Jan 2016 10:40:16 +0000 (11:40 +0100)
committerKlaas Freitag <freitag@owncloud.com>
Thu, 21 Jan 2016 10:40:53 +0000 (11:40 +0100)
admin/win/create_stable_toolchain.sh [new file with mode: 0755]

diff --git a/admin/win/create_stable_toolchain.sh b/admin/win/create_stable_toolchain.sh
new file mode 100755 (executable)
index 0000000..a158c32
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#
+# This script creates a new windows toolchain repository in OBS.
+# It only works for versions that do not yet exist.
+#
+# Make sure to adopt the variable stableversion.
+
+# Set the new stable version accordingly:
+stableversion=2.1
+targetproject="isv:ownCloud:toolchains:mingw:win32:${stableversion}"
+
+# Create the new repo
+
+# get the xml build description of the stable repo
+xml=`osc meta prj isv:ownCloud:toolchains:mingw:win32:stable`
+stable_xml="${xml/stable/$stableversion}"
+
+echo $stable_xml
+
+echo $stable_xml | osc meta prj -F - ${targetproject}
+
+
+# now copy all packages
+packs=`osc ls isv:ownCloud:toolchains:mingw:win32:stable`
+
+for pack in $packs
+do
+    osc copypac isv:ownCloud:toolchains:mingw:win32:stable $pack $targetproject
+done