gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29177 - in gnunet: contrib src/identity


From: gnunet
Subject: [GNUnet-SVN] r29177 - in gnunet: contrib src/identity
Date: Wed, 11 Sep 2013 01:23:12 +0200

Author: grothoff
Date: 2013-09-11 01:23:12 +0200 (Wed, 11 Sep 2013)
New Revision: 29177

Modified:
   gnunet/contrib/gnunet-gns-import.sh
   gnunet/src/identity/gnunet-service-identity.c
Log:
-anonymous contribution: patch to add -c support to gnunet-gns-import.sh

Modified: gnunet/contrib/gnunet-gns-import.sh
===================================================================
--- gnunet/contrib/gnunet-gns-import.sh 2013-09-10 20:37:56 UTC (rev 29176)
+++ gnunet/contrib/gnunet-gns-import.sh 2013-09-10 23:23:12 UTC (rev 29177)
@@ -1,30 +1,48 @@
 #!/bin/sh
 # This shell-script will import some GNS authorities into your GNS
 # namestore.
-#
+
+options=''
+
+while getopts "c:" opt; do
+  case $opt in
+    c)
+      options+="-c $OPTARG"
+      ;;
+    \?)
+      echo "Invalid option: -$OPTARG" >&2
+      exit 1
+      ;;
+    :)
+      echo "Option -$OPTARG requires an argument." >&2
+      exit 1
+      ;;
+  esac
+done
+
 # By default, we create three GNS zones:
-gnunet-identity -C master-zone 
-gnunet-identity -C short-zone
-gnunet-identity -C private-zone
+gnunet-identity -C master-zone $options
+gnunet-identity -C short-zone $options
+gnunet-identity -C private-zone $options
 
 # Additionally, we create the FS SKS zone
-gnunet-identity -C sks-zone
+gnunet-identity -C sks-zone $options
 
 # Integrate those with the respective subsystems.
-gnunet-identity -e short-zone -s gns-short
-gnunet-identity -e master-zone -s gns-master
-gnunet-identity -e private-zone -s gns-private
-gnunet-identity -e sks-zone -s fs-sks
+gnunet-identity -e short-zone -s gns-short $options
+gnunet-identity -e master-zone -s gns-master $options
+gnunet-identity -e private-zone -s gns-private $options
+gnunet-identity -e sks-zone -s fs-sks $options
 
 # Get the public keys as strings (so we can create PKEY records)
-MASTER=`gnunet-identity -d | grep master-zone | awk '{print $3}'`
-SHORT=`gnunet-identity -d | grep short-zone | awk '{print $3}'`
-PRIVATE=`gnunet-identity -d | grep private-zone | awk '{print $3}'`
+MASTER=`gnunet-identity -d $options | grep master-zone | awk '{print $3}'`
+SHORT=`gnunet-identity -d $options | grep short-zone | awk '{print $3}'`
+PRIVATE=`gnunet-identity -d $options | grep private-zone | awk '{print $3}'`
 
 # Link short and private zones into master zone
-gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE 
-gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT 
+gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE 
$options
+gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT 
$options
 
 # Link GNUnet's FCFS zone into master zone under label "pin"
-gnunet-namestore -z master-zone -a -e never -n pin -p -t PKEY -V 
72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG
+gnunet-namestore -z master-zone -a -e never -n pin -p -t PKEY -V 
72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG $options
 

Modified: gnunet/src/identity/gnunet-service-identity.c
===================================================================
--- gnunet/src/identity/gnunet-service-identity.c       2013-09-10 20:37:56 UTC 
(rev 29176)
+++ gnunet/src/identity/gnunet-service-identity.c       2013-09-10 23:23:12 UTC 
(rev 29177)
@@ -800,9 +800,9 @@
  *
  * @param cls NULL
  * @param filename name of the file to parse
- * @return GNUNET_OK to continue to iterate,
- *  GNUNET_NO to stop iteration with no error,
- *  GNUNET_SYSERR to abort iteration with error!
+ * @return #GNUNET_OK to continue to iterate,
+ *  #GNUNET_NO to stop iteration with no error,
+ *  #GNUNET_SYSERR to abort iteration with error!
  */
 static int
 process_ego_file (void *cls,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]