[med-svn] [Git][med-team/community/package_template][master] Add script that personalises the template for you

Andreas Tille gitlab at salsa.debian.org
Fri Mar 22 06:46:36 GMT 2019


Andreas Tille pushed to branch master at Debian Med / community / package_template


Commits:
af5501bc by Andreas Tille at 2019-03-10T08:35:03Z
Add script that personalises the template for you

- - - - -


4 changed files:

- debian/changelog
- debian/control
- debian/copyright
- + personalise_template


Changes:

=====================================
debian/changelog
=====================================
@@ -2,4 +2,4 @@
 
   * Initial release (Closes: #<bug>)
 
- -- DMPT <debian-med-packaging at lists.alioth.debian.org>  `date -R`
+ -- <your_ID>  <timestamp_as_per_date_-R>


=====================================
debian/control
=====================================
@@ -2,7 +2,7 @@ Source: <pkg>
 Section: science
 Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: your_ID
+Uploaders: <your_ID>
 Build-Depends: debhelper (>= 12~)
 Standards-Version: 4.3.0
 Vcs-Browser: https://salsa.debian.org/med-team/<pkg>


=====================================
debian/copyright
=====================================
@@ -12,5 +12,5 @@ Copyright: 20xx-20yy <upstream>
 License: <license>
 
 Files: debian/*
-Copyright: 2019 maintainername <maintainer at e.mail>
+Copyright: 2019 <your_ID>
 License: <license>


=====================================
personalise_template
=====================================
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Replaces templates for developer name, source package and data for you
+
+if [ "$DEBEMAIL" = "" ] ; then
+  echo "Please set DEBEMAIL in your environment for instance in .bashrc"
+  exit
+fi
+
+if [ "$DEBFULLNAME" = "" ] ; then
+  echo "Please set DEBFULLNAME in your environment for instance in .bashrc"
+  exit
+fi
+
+if [ $# -lt 1 ] ; then
+  echo "usage: $0 <sourcepackagename>"
+  exit
+fi
+
+if ! mkdir $1 2>/dev/null ; then
+  echo "Unable to create dir $1.  Is it just existing"
+  exit
+fi
+
+# FIXME: Check whether a package with this source name exists on salsa!
+
+cd $1
+cp -av `dirname $0`/debian .
+cd debian
+sed -i "s/<your_ID>/${DEBFULLNAME} <${DEBEMAIL}>/" `find . -maxdepth 1 -type f`
+sed -i "s/<pkg>/$1/" `find . -maxdepth 1 -type f`
+CHDATE=$(date -R)
+sed -i "s/<timestamp_as_per_date_-R>/${CHDATE}/" changelog



View it on GitLab: https://salsa.debian.org/med-team/community/package_template/commit/af5501bc2e99d6499ce2c90b2b8f326511a36e01

-- 
View it on GitLab: https://salsa.debian.org/med-team/community/package_template/commit/af5501bc2e99d6499ce2c90b2b8f326511a36e01
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190322/cb0b5481/attachment-0001.html>


More information about the debian-med-commit mailing list