summaryrefslogtreecommitdiff
path: root/irfanview/deploy-to-obs.sh
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-12-04 13:47:53 +0000
committerB Stack <bgstack15@gmail.com>2020-12-04 13:47:53 +0000
commit6d2588bf021885b70e13b0fc616da8780e1e5821 (patch)
treee0760b9498f600e0097cbf441e181eac3fa4c626 /irfanview/deploy-to-obs.sh
parentMerge branch 'freefilesync-bump' into 'master' (diff)
parentfix rpm doc/irfanview/Html deployment (diff)
downloadstackrpms-6d2588bf021885b70e13b0fc616da8780e1e5821.tar.gz
stackrpms-6d2588bf021885b70e13b0fc616da8780e1e5821.tar.bz2
stackrpms-6d2588bf021885b70e13b0fc616da8780e1e5821.zip
Merge branch 'irfanview-bump' into 'master'
Irfanview 4.56 See merge request bgstack15/stackrpms!204
Diffstat (limited to 'irfanview/deploy-to-obs.sh')
-rwxr-xr-xirfanview/deploy-to-obs.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/irfanview/deploy-to-obs.sh b/irfanview/deploy-to-obs.sh
new file mode 100755
index 0000000..e2fbd0f
--- /dev/null
+++ b/irfanview/deploy-to-obs.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Startdate: 2020-11-04 15:06
+# Purpose: make it a oneliner to get into the OBS
+# Reference:
+# ublock-origin-combined/deploy-to-obs.sh
+# Dependencies:
+# osc
+
+devdir=~/dev
+gitdir="${devdir}/stackrpms/irfanview"
+obsdir="${devdir}/osc/home:bgstack15/irfanview"
+
+# Flow
+cd "${devdir}"
+"${gitdir}/build-orig-tarball.sh"
+echo "DONE WITH build-orig-tarball"
+tf="$( find . -maxdepth 1 -name 'irfanview*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 'irfan*dsc' -printf '%T@ %f\n' | sort -n -k1 | awk '{print $NF}' | tail -n1 | cut -d' ' -f2 )"
+debian_tar_file="$( find . -maxdepth 1 -name 'irfan*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