GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix amazonlinux install script (#9967) · PowerShell/PowerShell@4967416

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .vsts-ci
    • install-ps.yml
  • tools
    • installpsh-amazonlinux.sh
    • installpsh-debian.sh
    • installpsh-osx.sh
    • installpsh-redhat.sh
    • installpsh-suse.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.vsts-ci/install-ps.yml‎

Copy file name to clipboardExpand all lines: .vsts-ci/install-ps.yml
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,22 @@ phases:
7676
{
7777
throw "powershell was not upgraded: $($PSVersionTable.PSVersion)"
7878
}
79-
# ignoring this due to https://github.com/PowerShell/PowerShell/issues/9285
80-
continueOnError: true
79+
continueOnError: false
8180

8281
# TODO: add sudo to script and use image with sudo
8382
- template: templates/install-ps-phase.yml
8483
parameters:
8584
scriptName: ./tools/install-powershell.sh
8685
jobName: InstallPowerShellCentOS
8786
pool: Hosted Ubuntu 1604
88-
container: mcr.microsoft.com/powershell:centos-7
87+
container: mcr.microsoft.com/powershell/test-deps:centos-7
88+
89+
- template: templates/install-ps-phase.yml
90+
parameters:
91+
scriptName: ./tools/install-powershell.sh
92+
jobName: InstallPowerShellDebian9
93+
pool: Hosted Ubuntu 1604
94+
container: mcr.microsoft.com/powershell/test-deps:debian-9
8995

9096

9197
# VSTS could not find pwsh in:
Collapse file

‎tools/installpsh-amazonlinux.sh‎

Copy file name to clipboardExpand all lines: tools/installpsh-amazonlinux.sh
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ else
6666
elif [ "${OS}" == "Linux" ] ; then
6767
if [ -f /etc/redhat-release ] ; then
6868
DistroBasedOn='redhat'
69+
elif [ -f /etc/system-release ] ; then
70+
DIST=$(sed s/\ release.*// < /etc/system-release)
71+
if [[ $DIST == *"Amazon Linux"* ]] ; then
72+
DistroBasedOn='amazonlinux'
73+
else
74+
DistroBasedOn='redhat'
75+
fi
6976
elif [ -f /etc/SuSE-release ] ; then
7077
DistroBasedOn='suse'
7178
elif [ -f /etc/mandrake-release ] ; then
Collapse file

‎tools/installpsh-debian.sh‎

Copy file name to clipboardExpand all lines: tools/installpsh-debian.sh
+14-2Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ else
6262
elif [ "${OS}" == "Linux" ] ; then
6363
if [ -f /etc/redhat-release ] ; then
6464
DistroBasedOn='redhat'
65+
elif [ -f /etc/system-release ] ; then
66+
DIST=$(sed s/\ release.*// < /etc/system-release)
67+
if [[ $DIST == *"Amazon Linux"* ]] ; then
68+
DistroBasedOn='amazonlinux'
69+
else
70+
DistroBasedOn='redhat'
71+
fi
6572
elif [ -f /etc/SuSE-release ] ; then
6673
DistroBasedOn='suse'
6774
elif [ -f /etc/mandrake-release ] ; then
@@ -104,8 +111,13 @@ fi
104111

105112
#Collect any variation details if required for this distro
106113
# shellcheck disable=SC1091
107-
. /etc/lsb-release
108-
DISTRIB_ID=$(lowercase "$DISTRIB_ID")
114+
if [[ -f /etc/lsb-release ]]; then
115+
. /etc/lsb-release
116+
DISTRIB_ID=$(lowercase "$DISTRIB_ID")
117+
elif [[ -f /etc/debian_version ]]; then
118+
DISTRIB_ID="debian"
119+
DISTRIB_RELEASE=$(cat /etc/debian_version)
120+
fi
109121
#END Collect any variation details if required for this distro
110122

111123
#If there are known incompatible versions of this distro, put the test, message and script exit here:
Collapse file

‎tools/installpsh-osx.sh‎

Copy file name to clipboardExpand all lines: tools/installpsh-osx.sh
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ else
6060
elif [ "${OS}" == "Linux" ] ; then
6161
if [ -f /etc/redhat-release ] ; then
6262
DistroBasedOn='redhat'
63+
elif [ -f /etc/system-release ] ; then
64+
DIST=$(sed s/\ release.*// < /etc/system-release)
65+
if [[ $DIST == *"Amazon Linux"* ]] ; then
66+
DistroBasedOn='amazonlinux'
67+
else
68+
DistroBasedOn='redhat'
69+
fi
6370
elif [ -f /etc/SuSE-release ] ; then
6471
DistroBasedOn='suse'
6572
elif [ -f /etc/mandrake-release ] ; then
Collapse file

‎tools/installpsh-redhat.sh‎

Copy file name to clipboardExpand all lines: tools/installpsh-redhat.sh
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ else
6464
elif [ "${OS}" == "Linux" ] ; then
6565
if [ -f /etc/redhat-release ] ; then
6666
DistroBasedOn='redhat'
67+
elif [ -f /etc/system-release ] ; then
68+
DIST=$(sed s/\ release.*// < /etc/system-release)
69+
if [[ $DIST == *"Amazon Linux"* ]] ; then
70+
DistroBasedOn='amazonlinux'
71+
else
72+
DistroBasedOn='redhat'
73+
fi
6774
elif [ -f /etc/SuSE-release ] ; then
6875
DistroBasedOn='suse'
6976
elif [ -f /etc/mandrake-release ] ; then
Collapse file

‎tools/installpsh-suse.sh‎

Copy file name to clipboardExpand all lines: tools/installpsh-suse.sh
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ else
6464
elif [ "${OS}" == "Linux" ] ; then
6565
if [ -f /etc/redhat-release ] ; then
6666
DistroBasedOn='redhat'
67+
elif [ -f /etc/system-release ] ; then
68+
DIST=$(sed s/\ release.*// < /etc/system-release)
69+
if [[ $DIST == *"Amazon Linux"* ]] ; then
70+
DistroBasedOn='amazonlinux'
71+
else
72+
DistroBasedOn='redhat'
73+
fi
6774
elif [ -f /etc/SuSE-release ] ; then
6875
DistroBasedOn='suse'
6976
elif [ -f /etc/mandrake-release ] ; then

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.