File size: 552 Bytes
48bc246
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
BASE_DIR="$(dirname "$SCRIPT_DIR")"
RAW_DIR="$BASE_DIR/raw"

mkdir -p "$RAW_DIR"

urls=(
    "https://snap.stanford.edu/data/amazon/productGraph/categoryFiles/reviews_Apps_for_Android_5.json.gz"
    "https://snap.stanford.edu/data/amazon/productGraph/categoryFiles/meta_Apps_for_Android.json.gz"
)

for url in "${urls[@]}"; do
    wget -P "$RAW_DIR" "$url"
done

for file in "$RAW_DIR"/*.gz; do
    gunzip "$file"
done

echo "Download and extraction complete."