[med-svn] [Git][med-team/community/package_template][master] 2 commits: Return with exit code 1 upon error.
Steffen Möller
gitlab at salsa.debian.org
Mon Jul 20 01:27:55 BST 2020
Steffen Möller pushed to branch master at Debian Med / community / package_template
Commits:
62773f16 by Steffen Möller at 2020-07-20T00:35:54+02:00
Return with exit code 1 upon error.
- - - - -
3119b077 by Steffen Möller at 2020-07-20T02:27:47+02:00
Prepare for multiple papers, consistent indent
- - - - -
2 changed files:
- debian/upstream/metadata
- personalise_template
Changes:
=====================================
debian/upstream/metadata
=====================================
@@ -1,15 +1,19 @@
Reference:
- Author:
- Title:
- Journal:
- Year:
- Volume:
- Number:
- Pages:
- DOI:
- PMID:
- URL:
- eprint:
+ - Author:
+ Title:
+ Journal:
+ Year:
+ Volume:
+ Number:
+ Pages:
+ DOI:
+ PMID:
+ URL:
+ eprint:
Registry:
- - Name: conda:bioconda
- Entry:
+ - Name: conda:bioconda
+ Entry:
+ - Name: SciCrunch
+ Entry:
+ - Name: bio.tools
+ Entry:
=====================================
personalise_template
=====================================
@@ -1,20 +1,37 @@
#!/bin/sh -e
# Replaces templates for developer name, source package and data for you
+if [ ! -f /usr/bin/realpath ]; then
+ echo "E: Please install the coreutils package for 'realpath'."
+ exit 1
+fi
+
+rootdir=$(realpath $(dirname "$0"))
+
+if [ "package_template" = "$(basename $(dirname $(pwd)))" ]; then
+ echo "E: Execute this script from with in the root of a new package's source tree."
+ exit 1
+fi
+
+if [ -d debian ]; then
+ echo "E: The current directory is the destination directory. It should not already have a debian directory."
+ exit 1
+fi
+
if [ "$DEBEMAIL" = "" ] ; then
- echo "Please set DEBEMAIL in your environment for instance in .bashrc"
- exit
+ echo "E: Please set DEBEMAIL in your environment for instance in .bashrc"
+ exit 1
fi
if [ "$DEBFULLNAME" = "" ] ; then
- echo "Please set DEBFULLNAME in your environment for instance in .bashrc"
- exit
+ echo "E: Please set DEBFULLNAME in your environment for instance in .bashrc"
+ exit 1
fi
if [ $# -lt 1 ] ; then
echo "usage: $0 <sourcepackagename>"
echo " $0 <homepage>"
- exit
+ exit 1
fi
if echo "$1" | grep -q '^http.*://' ; then
@@ -26,9 +43,9 @@ else
PKG=$1
fi
-if ! mkdir "$PKG" 2>/dev/null ; then
- echo "Unable to create dir $PKG. Is it just existing"
- exit
+if ! mkdir "$PKG" ; then
+ echo "E: Unable to create dir \"$PKG\"."
+ exit 1
fi
# FIXME: Check whether a package with this source name exists on salsa!
View it on GitLab: https://salsa.debian.org/med-team/community/package_template/-/compare/a7606708da66def4aad602c33fd0389dde68d823...3119b07742dbca03f675fe1832dda12a24b0d364
--
View it on GitLab: https://salsa.debian.org/med-team/community/package_template/-/compare/a7606708da66def4aad602c33fd0389dde68d823...3119b07742dbca03f675fe1832dda12a24b0d364
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/20200720/bcc65969/attachment-0001.html>
More information about the debian-med-commit
mailing list