File size: 580 Bytes
73c83cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
#!/bin/bash -e
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved


root=$1
if [[ -z "$root" ]]; then
  echo "Usage: ./gen_wheel_index.sh /path/to/wheels"
  exit
fi

index=$root/index.html

cd "$root"
for cu in cpu cu92 cu100 cu101 cu102; do
  cd $cu
  echo "Creating $PWD/index.html ..."
  for whl in *.whl; do
    echo "<a href=\"${whl/+/%2B}\">$whl</a><br>"
  done > index.html
  cd "$root"
done

echo "Creating $index ..."
for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort); do
  echo "<a href=\"${whl/+/%2B}\">$whl</a><br>"
done > "$index"