Commit af5501bc authored by Andreas Tille's avatar Andreas Tille
Browse files

Add script that personalises the template for you

parent 226404ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@

  * Initial release (Closes: #<bug>)

 -- DMPT <debian-med-packaging@lists.alioth.debian.org>  `date -R`
 -- <your_ID>  <timestamp_as_per_date_-R>
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Source: <pkg>
Section: science
Priority: optional
Maintainer: Debian Med Packaging Team <debian-med-packaging@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>
+1 −1
Original line number Diff line number Diff line
@@ -12,5 +12,5 @@ Copyright: 20xx-20yy <upstream>
License: <license>

Files: debian/*
Copyright: 2019 maintainername <maintainer@e.mail>
Copyright: 2019 <your_ID>
License: <license>

personalise_template

0 → 100755
+32 −0
Original line number Diff line number Diff line
#!/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