[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r18168: {tor} Add base64-decode as an alias or shell function. it was a pr (tor/trunk/contrib/directory-archive)



Author: weasel
Date: 2009-01-18 08:12:47 -0500 (Sun, 18 Jan 2009)
New Revision: 18168

Modified:
   tor/trunk/contrib/directory-archive/fetch-all-functions
Log:
Add base64-decode as an alias or shell function.  it was a proper binary in sarge

Modified: tor/trunk/contrib/directory-archive/fetch-all-functions
===================================================================
--- tor/trunk/contrib/directory-archive/fetch-all-functions	2009-01-18 13:03:44 UTC (rev 18167)
+++ tor/trunk/contrib/directory-archive/fetch-all-functions	2009-01-18 13:12:47 UTC (rev 18168)
@@ -70,3 +70,11 @@
 	#	echo "$objecttype $digest" >> failed
 	#fi
 }
+
+if [ -x /usr/bin/base64 ] ; then
+	alias base64-decode='/usr/bin/base64 -d'
+else
+	base64-decode() {
+		perl -MMIME::Base64 -e 'print decode_base64(<>)'
+	}
+fi