From: George Milescu Date: Wed, 18 Aug 2010 09:13:05 +0000 (+0200) Subject: Updated tribler scripts to get the torrent file as an argument is no node-config... X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=d0c044c5decd32d1e27029af543b427707d97ea3;p=p2p-testing-infrastructure.git Updated tribler scripts to get the torrent file as an argument is no node-config file is provided Signed-off-by: George Milescu --- diff --git a/ControlScripts/clients/tribler/start_tribler_doe.sh b/ControlScripts/clients/tribler/start_tribler_doe.sh index 9a280b8..5c2bbd0 100755 --- a/ControlScripts/clients/tribler/start_tribler_doe.sh +++ b/ControlScripts/clients/tribler/start_tribler_doe.sh @@ -8,7 +8,7 @@ # * starts a tribler cmd-line instance with the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder # * at the end deletes the downloaded data # -# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder +# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the torrent file name that will be loaded from the TorrentsAndData folder # # Read the global configuration file @@ -27,6 +27,10 @@ else source ../ClientWorkingFolders/TmpLogs/node_config fi +if [ " $TORRENT_FILE" = " " ]; then + TORRENT_FILE=$1 +fi + export PYTHONPATH=$PYTHONPATH:. cd $TRIBLER_REL_PATH diff --git a/ControlScripts/clients/tribler/start_tribler_leecher.sh b/ControlScripts/clients/tribler/start_tribler_leecher.sh index 7353376..36bcd05 100755 --- a/ControlScripts/clients/tribler/start_tribler_leecher.sh +++ b/ControlScripts/clients/tribler/start_tribler_leecher.sh @@ -8,7 +8,7 @@ # * starts a tribler cmd-line instance with the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder # * at the end deletes the downloaded data # -# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder +# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the torrent file name that will be loaded from the TorrentsAndData folder # # Read the global configuration file @@ -27,6 +27,10 @@ else source ../ClientWorkingFolders/TmpLogs/node_config fi +if [ " $TORRENT_FILE" = " " ]; then + TORRENT_FILE=$1 +fi + export PYTHONPATH=$PYTHONPATH:. cd $TRIBLER_REL_PATH diff --git a/ControlScripts/clients/tribler/start_tribler_proxy.sh b/ControlScripts/clients/tribler/start_tribler_proxy.sh index ada6fde..89af2bf 100755 --- a/ControlScripts/clients/tribler/start_tribler_proxy.sh +++ b/ControlScripts/clients/tribler/start_tribler_proxy.sh @@ -11,7 +11,7 @@ # Script arguments: # * proxy number [1-4] # -# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder +# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the the proxy number # if [ ! $# -eq 1 ]; then diff --git a/ControlScripts/clients/tribler/start_tribler_seeder.sh b/ControlScripts/clients/tribler/start_tribler_seeder.sh index 023d4e9..3d4d097 100755 --- a/ControlScripts/clients/tribler/start_tribler_seeder.sh +++ b/ControlScripts/clients/tribler/start_tribler_seeder.sh @@ -7,7 +7,7 @@ # * changes current working directory to proxyservice-m32 # * starts a command line BT client seeding the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder # -# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder +# If you run this script manually, you must run it from the P2P-Testing-Infrastructure/ControlScripts folder and use one argument: the torrent file name that will be loaded from the TorrentsAndData folder # # Read the global configuration file @@ -26,6 +26,9 @@ else source ../ClientWorkingFolders/TmpLogs/node_config fi +if [ " $TORRENT_FILE" = " " ]; then + TORRENT_FILE=$1 +fi export PYTHONPATH=$PYTHONPATH:.