[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17842 - in gnunet-update: . bin gnunet_update
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17842 - in gnunet-update: . bin gnunet_update |
Date: |
Fri, 28 Oct 2011 14:18:26 +0200 |
Author: harsha
Date: 2011-10-28 14:18:25 +0200 (Fri, 28 Oct 2011)
New Revision: 17842
Added:
gnunet-update/bin/
gnunet-update/bin/gnunet-update
Modified:
gnunet-update/gnunet_update/__init__.py
gnunet-update/gnunet_update/__main__.py
gnunet-update/gnunet_update/dependency.py
gnunet-update/gnunet_update/install.py
gnunet-update/gnunet_update/package.py
Log:
added bash script interface
Added: gnunet-update/bin/gnunet-update
===================================================================
--- gnunet-update/bin/gnunet-update (rev 0)
+++ gnunet-update/bin/gnunet-update 2011-10-28 12:18:25 UTC (rev 17842)
@@ -0,0 +1,50 @@
+#!/bin/bash
+# This file is part of GNUnet.
+# (C) 2001--2011 Christian Grothoff (and other contributing authors)
+#
+# GNUnet is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; either version 2, or (at your
+# option) any later version.
+#
+# GNUnet is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNUnet; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+#File: bin/gnunet-update
+#Author: Sree Harsha Totakura
+#
+# Bash script interface for gnunet-update python modules
+
+if [ ! -n "$GNUNET_UPDATE_HOME" ] #Do our best to find GNUNET_UPDATE_HOME
+then
+ #Find relative path based on the location of this executable
+ EXEC_NAME=$0
+
+ #check if we are a running from a symbolic link
+ if [ -L $EXEC_NAME ]
+ then
+ #Follow the symbolic link
+ REAL_EXEC=`realpath $EXEC_NAME`
+ $REAL_EXEC $@
+ exit $?
+ elif [ ${EXEC_NAME:0:1} == '/' ] # Absolute path
+ then
+ GNUNET_UPDATE_HOME=$(dirname ${EXEC_NAME})/../
+ else #our last hope before we fail
+ GNUNET_UPDATE_HOME=$(dirname ${EXEC_NAME})/../
+ fi
+fi
+
+PYTHON=`which python`
+if [ $? != 0 ]; then
+ echo "We need python for executing gnunet-update"
+ exit 1
+fi
+$PYTHON $GNUNET_UPDATE_HOME/gnunet_update $@
\ No newline at end of file
Property changes on: gnunet-update/bin/gnunet-update
___________________________________________________________________
Added: svn:executable
+ *
Modified: gnunet-update/gnunet_update/__init__.py
===================================================================
--- gnunet-update/gnunet_update/__init__.py 2011-10-28 11:52:39 UTC (rev
17841)
+++ gnunet-update/gnunet_update/__init__.py 2011-10-28 12:18:25 UTC (rev
17842)
@@ -16,8 +16,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-#File: package.py
+#File: gnunet_update/__init__.py
#Author: Sree Harsha Totakura
#
-#gnunet_update python package initialization file
-
+#gnunet_update python package initialization file
\ No newline at end of file
Modified: gnunet-update/gnunet_update/__main__.py
===================================================================
--- gnunet-update/gnunet_update/__main__.py 2011-10-28 11:52:39 UTC (rev
17841)
+++ gnunet-update/gnunet_update/__main__.py 2011-10-28 12:18:25 UTC (rev
17842)
@@ -16,16 +16,19 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-#File: package.py
+#File: gnunet_update/__main__.py
#Author: Sree Harsha Totakura
#
#gnunet_update python package execution start point
+#This file is not supposed to be started manually. The files in the bin/
+#directory refer to this file and should be used by users.
+
import sys
def usage():
"""Print helpful usage information."""
print """
-Usage: python gnunet_update <action> [action args]
+Usage: gnunet-update <action> [action args]
Runs action with action args which are passed to action.
Valid actions are:
@@ -33,7 +36,7 @@
install
To know more about each action and what it does type:
- python gnunet_update action --help
+ gnunet-update action --help
"""
if len(sys.argv) < 2:
Modified: gnunet-update/gnunet_update/dependency.py
===================================================================
--- gnunet-update/gnunet_update/dependency.py 2011-10-28 11:52:39 UTC (rev
17841)
+++ gnunet-update/gnunet_update/dependency.py 2011-10-28 12:18:25 UTC (rev
17842)
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-#File: package.py
+#File: gnunet_update/dependency.py
#Author: Sree Harsha Totakura
#
#
Modified: gnunet-update/gnunet_update/install.py
===================================================================
--- gnunet-update/gnunet_update/install.py 2011-10-28 11:52:39 UTC (rev
17841)
+++ gnunet-update/gnunet_update/install.py 2011-10-28 12:18:25 UTC (rev
17842)
@@ -16,7 +16,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-#File: package.py
+#File: gnunet_update/install.py
#Author: Sree Harsha Totakura
#
#Python sript for installing the packages packed using package script
Modified: gnunet-update/gnunet_update/package.py
===================================================================
--- gnunet-update/gnunet_update/package.py 2011-10-28 11:52:39 UTC (rev
17841)
+++ gnunet-update/gnunet_update/package.py 2011-10-28 12:18:25 UTC (rev
17842)
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-#File: package.py
+#File: gnunet_update/package.py
#Author: Sree Harsha Totakura
#
#TODO:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17842 - in gnunet-update: . bin gnunet_update,
gnunet <=