File: sdk_init.sh

package info (click to toggle)
python-azure 20230112%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 749,544 kB
  • sloc: python: 6,815,827; javascript: 287; makefile: 195; xml: 109; sh: 105
file content (28 lines) | stat: -rwxr-xr-x 600 bytes parent folder | download | duplicates (2)
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

# install python3.10
add-apt-repository ppa:deadsnakes/ppa
apt-get install python3.10
apt-get install python3.10-venv

# init env
TMPDIR="$(dirname $(dirname $(readlink -f "$0")))/venv"
export TMPDIR
echo "$TMPDIR"
rm -rf $TMPDIR/venv-sdk
VIRTUAL_ENV=$TMPDIR/venv-sdk
export VIRTUAL_ENV
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH
echo "$PATH"
python3.10 -m venv $TMPDIR/venv-sdk
python -m pip install -U pip
python scripts/dev_setup.py -p azure-core

if [ x"$1" = x ]; then
        echo "[Generate] init success!!!"
        exit 0
fi

echo "{}" >> $1
echo "[Generate] init success!!!!"