From 222d91e787b411a12ffea6d21b8311a417029650 Mon Sep 17 00:00:00 2001 From: achi Date: Wed, 5 Jun 2024 05:16:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D1=83?= =?UTF-8?q?=20=D0=BD=D0=B0=20REDOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install-powershell.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 install-powershell.sh diff --git a/install-powershell.sh b/install-powershell.sh old mode 100644 new mode 100755 index ed22b36..dce6229 --- a/install-powershell.sh +++ b/install-powershell.sh @@ -4,12 +4,12 @@ POWERSHELL_VERSION="7.4.2" # Предварительные требования -apt-get update -apt-get install -y wget apt-transport-https software-properties-common - source /etc/os-release function Install-Ubuntu { + apt-get update + apt-get install -y wget apt-transport-https software-properties-common + # Download the PowerShell package file wget https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell_${POWERSHELL_VERSION}-1.deb_amd64.deb @@ -31,13 +31,14 @@ function Install-Rhel { if ! command -v pwsh &> /dev/null then echo "Powershell не установлен" + echo "Операционная система: $ID" if [ "$ID" = "ubuntu" ]; then Install-Ubuntu - elif [ $"ID" = "redos" ]; then + elif [ "$ID" = "redos" ]; then Install-Rhel else - echo "Установите powershell для вашей ОС $NAME, чтобы воспользоваться скриптом установки ЛЭРС" + echo "Установите powershell для вашей $NAME, чтобы воспользоваться скриптом установки ЛЭРС" fi else echo "Powershell установлен"