diff options
author | Erich Eckner <git@eckner.net> | 2021-09-19 20:16:11 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-09-19 20:16:11 +0200 |
commit | 0fe19c814fd3afde854bb1244cc1f03eae9afdba (patch) | |
tree | 641b661ea3b341b02c5d1e4f33f21b6b7d65e453 /azure-cli | |
parent | 94d7f561f515e609792d365b4aa98dcd6efe25b1 (diff) | |
download | archlinuxewe-0fe19c814fd3afde854bb1244cc1f03eae9afdba.tar.xz |
Revert "azure-cli -> python-azure-cli"
This reverts commit c9bdd1822eab5d842465721641a4b7f1ef16fd8f.
Diffstat (limited to 'azure-cli')
-rw-r--r-- | azure-cli/.gitignore | 1 | ||||
-rw-r--r-- | azure-cli/PKGBUILD | 42 | ||||
-rwxr-xr-x | azure-cli/az | 2 | ||||
-rw-r--r-- | azure-cli/install.response | 8 |
4 files changed, 53 insertions, 0 deletions
diff --git a/azure-cli/.gitignore b/azure-cli/.gitignore new file mode 100644 index 000000000..5da1f1db3 --- /dev/null +++ b/azure-cli/.gitignore @@ -0,0 +1 @@ +install-*.py diff --git a/azure-cli/PKGBUILD b/azure-cli/PKGBUILD new file mode 100644 index 000000000..5a8b07f9f --- /dev/null +++ b/azure-cli/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +# Contributor: pallxk <aur@pallxk.com> +# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux + +pkgname=azure-cli +pkgver=2.28.1 +pkgrel=1 +pkgdesc="Command-line tools for Azure." +arch=('any') +url="https://github.com/Azure/azure-cli" +license=('MIT') +depends=("python") +conflicts=("python-azure-cli") +source=("install-$pkgver.py::https://raw.githubusercontent.com/Azure/azure-cli/azure-cli-$pkgver/scripts/curl_install_pypi/install.py" + "install.response" + "az") +sha256sums=('c5107b96cfe881c46c8d8d9f401fcf931aab2b769a20fda58626b6e6e907219b' + '7c05e9915a52fb72fa8d1c498b173c42457d669351313eaddccf43f86ed0e0ec' + '990f70efec828c1e1f3f57748fc6e40f9705f2223dc96683e8e29d118daac116') +options=(!strip) + +prepare() { + rm -rf "$srcdir/azure-cli" + grep -v -E '^===>|^$' install.response | python "$srcdir/install-$pkgver.py" + find "$srcdir/azure-cli/bin" -type f -print0 | xargs -0 sed -i -e "s|$srcdir|/opt|g" +} + +pkgver() { + # Make sure we have a writable $HOME/.azure directory to run az + HOME=$srcdir "$srcdir/bin/az" --version 2> /dev/null | head -1 | tr -c -d 0-9. +} + +package() { + mkdir "$pkgdir/opt" + cp -r azure-cli "$pkgdir/opt" + + mkdir -p "$pkgdir/usr/bin" + install -Dm755 az "$pkgdir/usr/bin" + + install -Dm644 "$pkgdir/opt/azure-cli/az.completion" \ + "$pkgdir/etc/bash_completion.d/azure-cli" +} diff --git a/azure-cli/az b/azure-cli/az new file mode 100755 index 000000000..575f87a0a --- /dev/null +++ b/azure-cli/az @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +/opt/azure-cli/bin/python -m azure.cli "$@" diff --git a/azure-cli/install.response b/azure-cli/install.response new file mode 100644 index 000000000..346b205a8 --- /dev/null +++ b/azure-cli/install.response @@ -0,0 +1,8 @@ +===> In what directory would you like to place the install? (leave blank to use '~/lib/azure-cli'): +./azure-cli + +===> In what directory would you like to place the 'az' executable? (leave blank to use '~/bin'): +./bin + +===> Modify profile to update your $PATH and enable shell/tab completion now? (Y/n): +n |