aboutsummaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src')
-rwxr-xr-xtrunk/src/mkbuild22
1 files changed, 13 insertions, 9 deletions
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild
index fa8f828..2ff2435 100755
--- a/trunk/src/mkbuild
+++ b/trunk/src/mkbuild
@@ -18,8 +18,8 @@
#
# Based in model generic.SlackBuild of Luiz
#
-# Version 1.1.8
-PROG_VERSION=1.1.8
+# Version 1.1.9
+PROG_VERSION=1.1.9
PROG_NAME=`basename $0`
#--------------------------------------------------------------------
@@ -107,7 +107,6 @@ function set_parameters {
# Use: set_parameters $@
# where $@ are the parameters input
#
-
# Parameters analyze
while [ "$1" ]; do
case $1 in
@@ -651,18 +650,23 @@ error_codes
[ $# -eq 0 ] && mkbuild_use && exit 1
# Configure input parameters
-set_parameters $@
+set_parameters "$@"
[ $VERBOSE -eq $on ] && echo -e "$PROG_NAME version $PROG_VERSION\n"
-if [ ! -z $MKBUILD_NAME ]; then
+if [ ! -z "$MKBUILD_NAME" ]; then
# Create a new .mkbuild parameters-file
cp $MODEL_DIR/model.mkbuild ${MKBUILD_NAME}.mkbuild
# Package Author
- [ -z $AUTHOR ] && edit_file "YOUR NAME" "${AUTHOR}" ${MKBUILD_NAME}.mkbuild
- # Package Author Signature
- [ -z $AUTHOR_INITIAL ] && edit_file "YOUR SIGNATURE" "${AUTHOR_INITIAL}" ${MKBUILD_NAME}.mkbuild
+ if [ ! -z "$AUTHOR" ]; then
+ edit_file "YOUR NAME" "${AUTHOR}" ${MKBUILD_NAME}.mkbuild
+ # Package Author Signature
+ if [ -z "$AUTHOR_INITIALS" ]; then
+ AUTHOR_INITIALS=`echo $AUTHOR | tr '[A-Z]' '[a-z]' | sed 's/ /\n/g' | sed 's/^\([a-z]\).*/\1/' | sed ':i ; $! N ; s/\n// ; t i'`
+ fi
+ edit_file "YOUR SIGNATURE" "${AUTHOR_INITIALS}" ${MKBUILD_NAME}.mkbuild
+ fi
# Change Default SourceForge URL
- [ -z $URL ] && URL="http://downloads.sourceforge.net/[[PACKAGE NAME]]"
+ [ -z "$URL" ] && URL="http://downloads.sourceforge.net/[[PACKAGE NAME]]/"
edit_file "DEFAULT URL" "${URL}" ${MKBUILD_NAME}.mkbuild
# Change Package Name
edit_file "PACKAGE NAME" "${MKBUILD_NAME}" ${MKBUILD_NAME}.mkbuild