|
1 | | -#!/bin/bash |
2 | | - |
3 | | -set -e |
4 | | - |
5 | | -BASEPATH=$(cd "$(dirname $0)"; pwd) |
6 | | -OUTPUT_PATH="${BASEPATH}/output" |
7 | | -PYTHON=$(which python3) |
8 | | - |
9 | | -mk_new_dir() { |
10 | | - local create_dir="$1" # the target to make |
11 | | - |
12 | | - if [[ -d "${create_dir}" ]];then |
13 | | - rm -rf "${create_dir}" |
14 | | - fi |
15 | | - |
16 | | - mkdir -pv "${create_dir}" |
17 | | -} |
18 | | - |
19 | | -write_checksum() { |
20 | | - cd "$OUTPUT_PATH" || exit |
21 | | - PACKAGE_LIST=$(ls mindcv-*.whl) || exit |
22 | | - for PACKAGE_NAME in $PACKAGE_LIST; do |
23 | | - echo $PACKAGE_NAME |
24 | | - sha256sum -b "$PACKAGE_NAME" >"$PACKAGE_NAME.sha256" |
25 | | - done |
26 | | -} |
27 | | - |
28 | | -mk_new_dir "${OUTPUT_PATH}" |
29 | | - |
30 | | -${PYTHON} ${BASEPATH}/setup.py bdist_wheel |
31 | | - |
32 | | -mv ${BASEPATH}/dist/*whl ${OUTPUT_PATH} |
33 | | - |
34 | | -write_checksum |
35 | | - |
36 | | - |
37 | | -echo "------Successfully created mindcv package------" |
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +set -e |
| 4 | + |
| 5 | +BASEPATH=$(cd "$(dirname $0)"; pwd) |
| 6 | +OUTPUT_PATH="${BASEPATH}/output" |
| 7 | +PYTHON=$(which python3) |
| 8 | + |
| 9 | +mk_new_dir() { |
| 10 | + local create_dir="$1" # the target to make |
| 11 | + |
| 12 | + if [[ -d "${create_dir}" ]];then |
| 13 | + rm -rf "${create_dir}" |
| 14 | + fi |
| 15 | + |
| 16 | + mkdir -pv "${create_dir}" |
| 17 | +} |
| 18 | + |
| 19 | +write_checksum() { |
| 20 | + cd "$OUTPUT_PATH" || exit |
| 21 | + PACKAGE_LIST=$(ls mindcv-*.whl) || exit |
| 22 | + for PACKAGE_NAME in $PACKAGE_LIST; do |
| 23 | + echo $PACKAGE_NAME |
| 24 | + sha256sum -b "$PACKAGE_NAME" >"$PACKAGE_NAME.sha256" |
| 25 | + done |
| 26 | +} |
| 27 | + |
| 28 | +mk_new_dir "${OUTPUT_PATH}" |
| 29 | + |
| 30 | +${PYTHON} ${BASEPATH}/setup.py bdist_wheel |
| 31 | + |
| 32 | +mv ${BASEPATH}/dist/*whl ${OUTPUT_PATH} |
| 33 | + |
| 34 | +write_checksum |
| 35 | + |
| 36 | + |
| 37 | +echo "------Successfully created mindcv package------" |
0 commit comments