summaryrefslogtreecommitdiffstats
path: root/source/kdei/kde-l10n/kde-l10n.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/kdei/kde-l10n/kde-l10n.SlackBuild')
-rwxr-xr-xsource/kdei/kde-l10n/kde-l10n.SlackBuild23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/kdei/kde-l10n/kde-l10n.SlackBuild b/source/kdei/kde-l10n/kde-l10n.SlackBuild
index 971c9318a..5da71233c 100755
--- a/source/kdei/kde-l10n/kde-l10n.SlackBuild
+++ b/source/kdei/kde-l10n/kde-l10n.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2008 Robby Workman Northport, AL, USA
-# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,6 +29,8 @@
# default is to create an up-to-date ./languages list and build all the
# language packs.
+cd $(dirname $0) ; CWD=$(pwd)
+
if [ ! -r ./languages ]; then
for file in kde-l10n*xz ; do
echo $file | cut -f 3 -d - >> ./languages
@@ -60,8 +62,7 @@ fi
# Set the config option variables if they are not already set:
[ -r ../KDE.options ] && . ../KDE.options
-CWD=$(pwd)
-TMP=${TMP:-/tmp/kde-build}
+TMP=${TMP:-/tmp/kde_build}
# This function will insert missing kdepim translations from kde-l10n-4.4.5:
insert_kdepim() {
@@ -137,6 +138,13 @@ cd $PKG
if [ -z $PKGLANG ]; then
for PKGLANG in $(cat languages) ; do
PKGNAM=kde-l10n-$PKGLANG
+ # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+ # the name of the created package would be, and then exit. This information
+ # could be useful to other scripts.
+ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ continue
+ fi
PKG=$TMP/package-kde-l10n-$PKGLANG
# The global options may be overridden here (if needed):
[ -r ./local.options/$PKGLANG ] && . ./local.options/$PKGLANG
@@ -144,6 +152,13 @@ if [ -z $PKGLANG ]; then
done
else
PKGNAM=kde-l10n-$PKGLANG
+ # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+ # the name of the created package would be, and then exit. This information
+ # could be useful to other scripts.
+ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+ fi
PKG=$TMP/package-kde-l10n-$PKGLANG
# The global options may be overridden here (if needed):
[ -r ./local.options/$PKGLANG ] && . ./local.options/$PKGLANG