summaryrefslogtreecommitdiff
path: root/ublock-origin-combined
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-11-04 16:19:13 -0500
committerB Stack <bgstack15@gmail.com>2020-11-04 16:19:13 -0500
commit4a3d59b568bc95b2663b6e440d069dcc0506f356 (patch)
treebdadad85240b28260d555540ca30291e000ea75f /ublock-origin-combined
parentubo 1.16.4.26 rc1 (diff)
downloadstackrpms-4a3d59b568bc95b2663b6e440d069dcc0506f356.tar.gz
stackrpms-4a3d59b568bc95b2663b6e440d069dcc0506f356.tar.bz2
stackrpms-4a3d59b568bc95b2663b6e440d069dcc0506f356.zip
ubo: add a deploy-to-obs script
Diffstat (limited to 'ublock-origin-combined')
-rwxr-xr-xublock-origin-combined/deploy-to-obs.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/ublock-origin-combined/deploy-to-obs.sh b/ublock-origin-combined/deploy-to-obs.sh
new file mode 100755
index 0000000..a2913b0
--- /dev/null
+++ b/ublock-origin-combined/deploy-to-obs.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Startdate: 2020-11-04 15:06
+# Purpose: make it a oneliner to get into the OBS
+# Dependencies:
+# osc
+
+devdir=~/dev
+gitdir="${devdir}/stackrpms/ublock-origin-combined"
+obsdir="${devdir}/osc/home:bgstack15/ublock-origin-combined"
+
+# Flow
+cd "${devdir}"
+"${gitdir}/build-orig-tarball.sh"
+echo "DONE WITH build-orig-tarball"
+tf="$( find . -maxdepth 1 -name 'ublock*orig*z' -printf '%T@ %f\n' | sort -n -k1 | awk '{print $NF}' | tail -n1 )"
+tar -zxf "${tf}"
+cd "$( tar -zvtf "${tf}" | awk '/^d/{print $NF}' | head -n1 )"
+cp -pr "${gitdir}/debian" .
+debuild -us -uc # depends on dpkg-dev=1.19.7 and not 1.20.5 which is still broken in Ceres as of 2020-11-04
+test $? -eq 0 || { "debuild failed. Cannot continue. Aborted." ; exit 1 ; }
+cd "${devdir}"
+dsc_file="$( find . -maxdepth 1 -name 'ublock*dsc' -printf '%T@ %f\n' | sort -n -k1 | awk '{print $NF}' | tail -n1 | cut -d' ' -f2 )"
+debian_tar_file="$( find . -maxdepth 1 -name 'ublock*debian*z' -printf '%T@ %f\n' | sort -n -k1 | awk '{print $NF}' | tail -n1 | cut -d' ' -f2 )"
+
+# prep obs
+cd "${obsdir}"
+osc up
+osc rm *
+cd "${devdir}"
+cp -p "${dsc_file}" "${debian_tar_file}" "${tf}" "${obsdir}/"
+cd "${obsdir}"
+#find . -mindepth 1 -maxdepth 1 ! -name "${dsc_file}" ! -name "${debian_tar_file}" ! -name "${tf}" -delete
+osc add *
+osc commit # will prompt for commit name
bgstack15