public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10128 - main/branches/2.1.2/bin
@ 2008-05-03  4:17 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-05-03  4:17 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-05-03 04:17:57 +0000 (Sat, 03 May 2008)
New Revision: 10128

Modified:
   main/branches/2.1.2/bin/emerge-webrsync
Log:
Bug #219294 - Fix 'date' and 'cut' arguments for BSD userland. Thanks to
RB <aoz.syn@gmail.com> for this patch. (trunk r10126)


Modified: main/branches/2.1.2/bin/emerge-webrsync
===================================================================
--- main/branches/2.1.2/bin/emerge-webrsync	2008-05-03 04:16:44 UTC (rev 10127)
+++ main/branches/2.1.2/bin/emerge-webrsync	2008-05-03 04:17:57 UTC (rev 10128)
@@ -91,7 +91,11 @@
 
 get_utc_second_from_string() {
 	local s="$1"
-	date -d "${s:0:4}-${s:4:2}-${s:6:2}" -u +"%s"
+	if [[ ${USERLAND} == BSD ]] ; then
+		date -juf "%Y%m%d" "$s" +"%s"
+	else
+		date -d "${s:0:4}-${s:4:2}-${s:6:2}" -u +"%s"
+	fi
 }
 
 get_portage_timestamp() {
@@ -133,7 +137,7 @@
 	if type -P md5sum > /dev/null; then
 		md5sum -c $digest && r=0
 	elif type -P md5 > /dev/null; then
-		[ "$(md5 -q $file)" == "$(cut -d \ -f 1 \"$digest\")" ] && r=0
+		[ "$(md5 -q "${file}")" == "$(cut -d ' ' -f 1 "${digest}")" ] && r=0
 	else
 		eecho "cannot check digest: no suitable md5/md5sum binaries found"
 	fi

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-03  4:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-03  4:17 [gentoo-commits] portage r10128 - main/branches/2.1.2/bin Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox