pkgsrc-wip/autoproject/patches/patch-aa
2003-04-03 09:41:19 +00:00

53 lines
1.7 KiB
Text

$NetBSD: patch-aa,v 1.1.1.1 2003/04/03 09:41:20 bmeurer Exp $
--- autoproject.in.orig Wed Sep 18 01:42:42 2002
+++ autoproject.in
@@ -11,14 +11,16 @@ set -e
#set -v
prefix=@prefix@
+sysconfdir=@sysconfdir@
DATADIR=@datadir@
AWK=awk
+EXPR=@expr@
NAME=
EMAIL=
theoptions=a:d:e:i:l:n:o:p:vVh
# for testing: SKELETONS="/home/local/src/autoproject/lib"
-SKELETONS="$HOME/.autoproject /etc/autoproject $DATADIR/autoproject"
+SKELETONS="$HOME/.autoproject $sysconfdir/autoproject $DATADIR/autoproject"
# The version number for the new project is set in configure.in, and
# available in a C program as the #defined macro VERSION.
@@ -147,7 +149,7 @@ EOF
*) echo "Internal error! no case for option \"$c\"" ; exit 1 ;;
esac
done
-if [ $gnu_getopt != 1 ]; then shift `expr $OPTIND - 1`; fi
+if [ $gnu_getopt != 1 ]; then shift `$EXPR $OPTIND - 1`; fi
# Prompt user to select from a list
choose_from_list(){
@@ -200,7 +202,7 @@ while [ $LEGALNAME = no ]; do
if [ "$NAME" = "" ]; then
echo -n "What is the program name? "; read NAME;
fi
- if expr "$NAME" : '[a-z][_a-z0-9]*$' >/dev/null = 0; then
+ if $EXPR "$NAME" : '[a-z][_a-z0-9]*$' >/dev/null = 0; then
echo " Illegal program name $NAME. Must be lowercase letters and digits or \`_'."
NAME=""
else
@@ -280,9 +282,9 @@ if [ "$AUTHOR" = "" ]; then
AUTHOR=`ypmatch $USER passwd.byname|$AWK -F: '{ print $5; }'`
fi
if echo $AUTHOR | grep -q -- "\,"; then
- X=`expr index "$AUTHOR" ","`
- X=`expr $X - 1`
- AUTHOR=`expr substr "$AUTHOR" 1 $X`
+ X=`$EXPR index "$AUTHOR" ","`
+ X=`$EXPR $X - 1`
+ AUTHOR=`$EXPR substr "$AUTHOR" 1 $X`
fi
type_string "What is the name of the author?" "$AUTHOR" ""
AUTHOR="$ans"