Add option for source checking (default: OFF).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>
This commit is contained in:
Willy Sudiarto Raharjo 2016-06-26 00:40:42 +07:00
parent 49a59b0b52
commit d7f382d0e0
No known key found for this signature in database
GPG key ID: 887B8374D7333381
4 changed files with 48 additions and 28 deletions

View file

@ -37,6 +37,9 @@ OUTPUT=${OUTPUT:-/tmp}
# This is the original directory where you started this script
MSBROOT=$(pwd)
# Check for duplicate sources (default: OFF)
CHECKDUPLICATE=0
# Loop for all base packages
for dir in \
base/mate-common \
@ -76,13 +79,15 @@ for dir in \
# Get the build
build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* 2>/dev/null | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
if [ $CHECKDUPLICATE -eq 1 ]; then
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* 2>/dev/null | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
fi
fi
# The real build starts here

View file

@ -36,6 +36,9 @@ OUTPUT=${OUTPUT:-/tmp}
# This is the original directory where you started this script
MSBROOT=$(pwd)
# Check for duplicate sources (default: OFF)
CHECKDUPLICATE=0
# Loop for all dependency packages
for dir in \
deps/zenity \
@ -68,13 +71,15 @@ for dir in \
# Get the build
build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* 2>/dev/null | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
if [ $CHECKDUPLICATE -eq 1 ]; then
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* 2>/dev/null | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
fi
fi
# The real build starts here

View file

@ -37,6 +37,9 @@ OUTPUT=${OUTPUT:-/tmp}
# This is the original directory where you started this script
MSBROOT=$(pwd)
# Check for duplicate sources (default: OFF)
CHECKDUPLICATE=0
# Loop for all extra packages
for dir in \
extra/galculator \
@ -62,13 +65,15 @@ for dir in \
# Get the build
build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* 2>/dev/null | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
if [ $CHECKDUPLICATE -eq 1 ]; then
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* 2>/dev/null | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
fi
fi
# The real build starts here

View file

@ -36,6 +36,9 @@ TMP=${TMP:-/tmp}
# This is the original directory where you started this script
MSBROOT=$(pwd)
# Check for duplicate sources (default: OFF)
CHECKDUPLICATE=0
# Loop for all packages
for dir in \
yelp \
@ -58,13 +61,15 @@ for dir in \
# Get the build
build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
if [ $CHECKDUPLICATE -eq 1 ]; then
# Check for duplicate sources
sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* | wc -l)"
if [ $sourcefile -gt 1 ]; then
echo "You have following duplicate sources:"
ls $MSBROOT/$dir/${package}-*.tar.?z* | cut -d " " -f1
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
fi
fi
# The real build starts here