From d0c044c5decd32d1e27029af543b427707d97ea3 Mon Sep 17 00:00:00 2001 From: George Milescu Date: Wed, 18 Aug 2010 11:13:05 +0200 Subject: [PATCH] Updated tribler scripts to get the torrent file as an argument is no node-config file is provided Signed-off-by: George Milescu --- ControlScripts/clients/tribler/start_tribler_doe.sh | 6 +++++- ControlScripts/clients/tribler/start_tribler_leecher.sh | 6 +++++- ControlScripts/clients/tribler/start_tribler_proxy.sh | 2 +- ControlScripts/clients/tribler/start_tribler_seeder.sh | 5 ++++- 4 files changed, 15 insertions(+), 4 deletions(-) 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:. -- 2.20.1