diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-31 16:35:33 +0000 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-03-31 16:35:33 +0000 |
| commit | fec5e888a10f6d6c0a64d17242d293fc9da6d3d2 (patch) | |
| tree | 92e14683798648106e573555ed4a97658dfb7122 /config/.bashrc | |
| parent | d0ff10b6ae1075a13827e00dd0120fac9639fde8 (diff) | |
| parent | 67e1de7e57a843622a824f68e4ffb40d8b9ff320 (diff) | |
Merge branch '199059-setup-py' into 'master'v3.3.0
Use virtualenv and pip-licenses to scan python projects
See merge request gitlab-org/security-products/license-management!128
Diffstat (limited to 'config/.bashrc')
| -rw-r--r-- | config/.bashrc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/config/.bashrc b/config/.bashrc index e85ae56..e883436 100644 --- a/config/.bashrc +++ b/config/.bashrc @@ -3,8 +3,8 @@ alias nuget='mono /usr/local/bin/nuget.exe' function inflate() { - file=$1 - to_dir=$2 + local file=$1 + local to_dir=$2 if [ -f "$file" ]; then echo "Inflating $file in $to_dir" tar --use-compress-program zstd -xf "$file" -C "$to_dir" @@ -13,12 +13,17 @@ function inflate() { } function switch_to() { - tool=$1 - major_version=$2 + local tool=$1 + local major_version=$2 + local version version="$(grep "$tool" "$HOME/.tool-versions"| tr ' ' '\n' | grep "^$major_version")" asdf shell "$tool" "$version" } +function major_version_from() { + echo "$1" | cut -d'.' -f1 +} + function enable_dev_mode() { unset HISTFILESIZE unset HISTSIZE |
