From f9d5e4ced8d27555594a9f4b224b4aa875bb9d4c Mon Sep 17 00:00:00 2001 From: B Stack Date: Mon, 1 Feb 2021 14:09:22 -0500 Subject: npp 7.9.2 rc1 --- notepadpp/deploy-to-obs.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 notepadpp/deploy-to-obs.sh (limited to 'notepadpp/deploy-to-obs.sh') diff --git a/notepadpp/deploy-to-obs.sh b/notepadpp/deploy-to-obs.sh new file mode 100755 index 0000000..5c9863f --- /dev/null +++ b/notepadpp/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/notepadpp" +obsdir="${devdir}/osc/home:bgstack15/notepadpp" + +# Flow +cd "${devdir}" +"${gitdir}/build-orig-tarball.sh" +echo "DONE WITH build-orig-tarball" +tf="$( find . -maxdepth 1 -name 'notepadpp*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 'notepadpp*dsc' -printf '%T@ %f\n' | sort -n -k1 | awk '{print $NF}' | tail -n1 | cut -d' ' -f2 )" +debian_tar_file="$( find . -maxdepth 1 -name 'notepadpp*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 -- cgit