| #!/bin/bash -e |
| |
|
|
|
|
| root=$(readlink -f $1) |
| if [[ -z "$root" ]]; then |
| echo "Usage: ./gen_wheel_index.sh /absolute/path/to/wheels" |
| exit |
| fi |
|
|
| export LC_ALL=C |
| |
|
|
| index=$root/index.html |
|
|
| cd "$root" |
| for cu in cpu cu92 cu100 cu101 cu102 cu110 cu111 cu113; do |
| mkdir -p "$root/$cu" |
| cd "$root/$cu" |
| echo "Creating $PWD/index.html ..." |
| |
| |
| for whl in $(find -type f -name '*.whl' -printf '%P\n' \ |
| | sort -k 1 -r | sort -t '/' -k 2 --stable -r --unique); do |
| echo "<a href=\"${whl/+/%2B}\">$whl</a><br>" |
| done > index.html |
|
|
|
|
| for torch in torch*; do |
| cd "$root/$cu/$torch" |
|
|
| |
| echo "Creating $PWD/index.html ..." |
| for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort -r); do |
| echo "<a href=\"${whl/+/%2B}\">$whl</a><br>" |
| done > index.html |
| done |
| done |
|
|
| cd "$root" |
| |
| echo "Creating $index ..." |
| for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort -r); do |
| echo "<a href=\"${whl/+/%2B}\">$whl</a><br>" |
| done > "$index" |
|
|
|
|