|
@@ -16,13 +16,13 @@ if [ "$?" != 0 ]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
fast=false
|
|
fast=false
|
|
|
-parallel=false
|
|
|
|
|
|
|
+sequential=false
|
|
|
|
|
|
|
|
while [ -n "$1" ]; do
|
|
while [ -n "$1" ]; do
|
|
|
if [ "$1" == "--fast" ]; then
|
|
if [ "$1" == "--fast" ]; then
|
|
|
fast=true
|
|
fast=true
|
|
|
- elif [ "$1" == "-p" ]; then
|
|
|
|
|
- parallel=true
|
|
|
|
|
|
|
+ elif [ "$1" == "-s" ]; then
|
|
|
|
|
+ sequential=true
|
|
|
fi
|
|
fi
|
|
|
shift
|
|
shift
|
|
|
done
|
|
done
|
|
@@ -30,28 +30,21 @@ done
|
|
|
# Get bridge data
|
|
# Get bridge data
|
|
|
if [ "$fast" == "true" ]; then
|
|
if [ "$fast" == "true" ]; then
|
|
|
echo "Repacking some pre-processed data for the next step..."
|
|
echo "Repacking some pre-processed data for the next step..."
|
|
|
- # We want data/bridge_data/pre_processed/bridge_data/
|
|
|
|
|
- cd data && \
|
|
|
|
|
- rm -rf bridge_data && \
|
|
|
|
|
- tar xzf bridge_data.tar.gz && \
|
|
|
|
|
- mkdir processed && \
|
|
|
|
|
- mv bridge_data processed && \
|
|
|
|
|
- tar czf pre_processed.tar.xz processed/* && \
|
|
|
|
|
- rm -r processed && \
|
|
|
|
|
- mkdir -p bridge_data && \
|
|
|
|
|
- mv pre_processed.tar.xz bridge_data && \
|
|
|
|
|
- cd ..
|
|
|
|
|
|
|
+ ./scripts/repack-preprocessed-data.sh
|
|
|
else
|
|
else
|
|
|
- if [ "$parallel" == "true" ]; then
|
|
|
|
|
- echo "Downloading and processing data from step 1 in 10 parallel steps..."
|
|
|
|
|
|
|
+ echo "Downloading data from the Tor Project..."
|
|
|
|
|
+ ./scripts/download-bridge-data.sh
|
|
|
|
|
+
|
|
|
|
|
+ if [ "$sequential" != "true" ]; then
|
|
|
|
|
+ echo "Processing data from step 1 in 10 parallel steps..."
|
|
|
echo "This will take a while (around an hour on my device)"
|
|
echo "This will take a while (around an hour on my device)"
|
|
|
echo "and require around 20 GB of free space while running."
|
|
echo "and require around 20 GB of free space while running."
|
|
|
- ./scripts/get-bridge-data.sh -p
|
|
|
|
|
|
|
+ ./scripts/get-bridge-data.sh
|
|
|
else
|
|
else
|
|
|
- echo "Downloading and processing data from step 1 sequentially..."
|
|
|
|
|
|
|
+ echo "Processing data from step 1 sequentially..."
|
|
|
echo "This will take quite a long time (around 12.5 hours on my device)"
|
|
echo "This will take quite a long time (around 12.5 hours on my device)"
|
|
|
echo "and require a few GB of free space while running."
|
|
echo "and require a few GB of free space while running."
|
|
|
- ./scripts/get-bridge-data.sh
|
|
|
|
|
|
|
+ ./scripts/get-bridge-data.sh -s
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
|
|
|