/usr/bin/dpsch-genpkg is in dpsyco-devel 1.0.36.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | #!/bin/sh
# DocumentId: $Id: dpsch-genpkg 2318 2006-07-19 17:58:05Z ola $
# Author: $Author: ola $
# Ola Lundqvist <opal@debian.org>
# Summary:
# This tool creates a file-structure for a
# system configuration package.
#
# Copyright (C) 2001-2004 Ola Lundqvist <opal@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
. /usr/share/dpsyco/change.func
SRCDIR=""
if [ -z "$1" ] ; then
echo "USAGE: dpsch-genpkg \$example"
echo ""
cd /usr/share/dpsyco-devel/genpkg
ls
cd /etc/dpsyco/examples
ls
echo ""
exit 0
elif echo "$1" | grep "^/" > /dev/null 2>&1 ; then
SRCDIR="$1"
elif [ -d /usr/share/dpsyco-devel/genpkg/$1 ] ; then
SRCDIR=/usr/share/dpsyco-devel/genpkg/$1
elif [ -d /etc/dpsyco/genpkg/$1 ] ; then
SRCDIR=/usr/share/dpsyco-devel/genpkg/$1
else
echo "USAGE: dpsch-genpkg example"
echo ""
cd /usr/share/dpsyco-devel/genpkg
ls
cd /etc/dpsyco/examples
ls
echo ""
exit 0
fi
FLIST="$(find $SRCDIR -type f -printf '%P ')"
if [ -z "$EMAIL" ] ; then
EMAIL="$USER@$(hostname -f)"
fi
if [ ! -z "$DEBEMAIL" ] ; then
EMAIL="$DEBEMAIL"
fi
if [ ! -z "$NAME" ] ; then
ADMIN="$NAME"
elif [ ! -z "$USER" ] ; then
ADMIN=$(getent passwd $USER | {
OIFS="$IFS"
IFS=:
read U P I G ADMIN HOME MORE SHELL
IFS="$OIFS"
echo "$ADMIN" | sed -e "s|\,.*$||g;"
})
fi
if [ -z "$ADMIN" ] ; then
echo "Can not find the administrators full name, so you have to type it here."
read ADMIN
fi
if [ -z "$EMAIL" ] ; then
echo "Can not find the administrators email, so you have to type it here."
read EMAIL
fi
if [ -z "$PACKAGE" ] ; then
PACKAGE=$(pwd | sed -e "s|^.*/||;")
fi
for FILE in $FLIST ; do
if echo "$FILE" | grep "/" > /dev/null 2>&1 ; then
DIR=$(echo "$FILE" | sed -e "s|/[^/]*$||;")
if [ ! -d "$DIR" ] ; then
mkdir -p $DIR
fi
fi
if [ ! -e "$FILE" ] ; then
cp -af $SRCDIR/$FILE $FILE
changefile "s|%ADMIN%|$ADMIN|g;
s|%EMAIL%|$EMAIL|g;
s|%PACKAGE%|$PACKAGE|g;
" $FILE
else
echo "$FILE does already exist, skipping."
fi
done
dpsch-gencvsignore
|