Fix up the join-dupicates.sh script and add an option to pull in the required
dependecies for it. While here, convert to USES=localbase. PR: 224620 Submitted by: mat
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= duff
|
||||
PORTVERSION= 0.5.2
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= SF
|
||||
|
||||
@@ -12,17 +12,20 @@ COMMENT= Duplicate file finder
|
||||
LICENSE= ZLIB
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
USES= tar:bzip2
|
||||
USES= localbase tar:bzip2 shebangfix
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
bash_OLD_CMD= /bin/sh
|
||||
SHEBANG_FILES= join-duplicates.sh
|
||||
|
||||
PORTDOCS= README.SHA
|
||||
|
||||
OPTIONS_DEFINE= NLS
|
||||
OPTIONS_DEFINE= JOIN NLS
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
JOIN_DESC= Add run-dependencies for join-duplicates.sh
|
||||
JOIN_RUN_DEPENDS= bash:shells/bash \
|
||||
gtouch:sysutils/coreutils
|
||||
|
||||
NLS_USES= gettext
|
||||
NLS_CONFIGURE_ENABLE= nls
|
||||
|
||||
|
||||
26
sysutils/duff/files/patch-join-duplicates.sh
Normal file
26
sysutils/duff/files/patch-join-duplicates.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
--- join-duplicates.sh.orig 2011-04-10 13:17:26 UTC
|
||||
+++ join-duplicates.sh
|
||||
@@ -25,16 +25,19 @@ duff -r '-f#' -z -p -P "$1" |
|
||||
if [ "$first" == '' ]; then
|
||||
first="$file"
|
||||
else
|
||||
- temp=`mktemp -p \`dirname $file\``
|
||||
+ dir=`dirname "$file"`
|
||||
+ temp=`gmktemp -p "$dir"`
|
||||
|
||||
mv "$file" "$temp" && \
|
||||
ln "$first" "$file" && \
|
||||
- touch --reference="$temp" "$file" && \
|
||||
+ gtouch --reference="$temp" "$file" && \
|
||||
rm "$temp"
|
||||
|
||||
+ echo "$first <- $file"
|
||||
+
|
||||
if [ $? != 0 ]; then
|
||||
- echo "`basename $0`: $file: failed to join with $first"
|
||||
- echo "`basename $0`: $file: may exist as $temp"
|
||||
+ echo "`basename "$0"`: $file: failed to join with $first"
|
||||
+ echo "`basename "$0"`: $file: may exist as $temp"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user