diff options
author | B Stack <bgstack15@gmail.com> | 2020-03-23 15:06:42 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-03-23 15:06:42 +0000 |
commit | 098605e5950da5fed94fa8d31e57e8ec8f74b416 (patch) | |
tree | df1da57b92f1aa8d7202e82767c439c1870005e5 /logout-manager/debian/make-dsc-for-obs.sh | |
parent | Merge branch 'freefilesync-bump' into 'master' (diff) | |
parent | Logout manager 0.0.2 (diff) | |
download | stackrpms-098605e5950da5fed94fa8d31e57e8ec8f74b416.tar.gz stackrpms-098605e5950da5fed94fa8d31e57e8ec8f74b416.tar.bz2 stackrpms-098605e5950da5fed94fa8d31e57e8ec8f74b416.zip |
Merge branch 'logout-manager-bump' into 'master'
Logout manager 0.0.2
See merge request bgstack15/stackrpms!145
Diffstat (limited to 'logout-manager/debian/make-dsc-for-obs.sh')
-rwxr-xr-x | logout-manager/debian/make-dsc-for-obs.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/logout-manager/debian/make-dsc-for-obs.sh b/logout-manager/debian/make-dsc-for-obs.sh new file mode 100755 index 0000000..da1c0b7 --- /dev/null +++ b/logout-manager/debian/make-dsc-for-obs.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Goal: convert the fresh dsc file to a generic one for obs that omits version and checksum info on filenames +# Use in debian/rules: +# APPNAME=name-of-binary-package +# override_dh_auto_build: +# dh_auto_build +# sh debian/make-dsc-for-obs.sh +tf="../$( find .. -maxdepth 1 -name "${APPNAME}_*dsc" -printf '%T@ %f\n' | sort | tail -n1 | awk '{print $NF}' )" +of="debian/$( basename "$( readlink -f "${tf}" )" | sed -r -e 's/_[0-9_\.]+[0-9_](-[0-9])?//;' )" +awk 'BEGIN{a=0} a > 0 {$2="1";gsub(/_[0-9_\.]+[0-9_](-[0-9])?/,"");} /^Files/{a=1} {print}' "${tf}" | sed -r -e '/Checksums-.{0,8}:\s*$/,/^Files/{/Files/!{d};}' -e '/^Files/,${s/^ ?[^\s]{32}/ 00000000000000000000000000000000/;};' > "${of}" |