Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .vsts-ci/install-ps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ trigger:
- feature*
paths:
include:
- /tools/install-powershell.sh
- /tools/installpsh-amazonlinux.sh
- /tools/installpsh-debian.sh
- /tools/installpsh-osx.sh
- /tools/installpsh-redhat.sh
- /tools/installpsh-suse.sh
- /tools/install-powershell.ps1
- /tools/install-powershell.*
- /tools/installpsh-*.sh
- /.vsts-ci/install-ps.yml
pr:
branches:
Expand All @@ -26,11 +21,7 @@ pr:
paths:
include:
- /tools/install-powershell.sh
- /tools/installpsh-amazonlinux.sh
- /tools/installpsh-debian.sh
- /tools/installpsh-osx.sh
- /tools/installpsh-redhat.sh
- /tools/installpsh-suse.sh
- /tools/installpsh-*.sh
- /tools/install-powershell.ps1
- /.vsts-ci/install-ps.yml

Expand Down
1 change: 1 addition & 0 deletions .vsts-ci/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pr:
- test/common/markdown/*
- test/perf/*
- tools/releaseBuild/*
- tools/install*
- tools/releaseBuild/azureDevOps/templates/*
- README.md
- .spelling
Expand Down
10 changes: 5 additions & 5 deletions tools/installpsh-mariner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ gitreposubpath="PowerShell/PowerShell/master"
gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools"
thisinstallerdistro=mariner
repobased=false
gitscriptname="installpsh-mariner.psh"
gitscriptname="installpsh-mariner.sh"
pwshlink=/usr/bin/pwsh

echo
Expand Down Expand Up @@ -109,11 +109,11 @@ fi
SUDO=''
if (( EUID != 0 )); then
#Check that sudo is available
if [[ ("'$*'" =~ skip-sudo-check) && ("$(whereis sudo)" == *'/'* && "$(sudo -nv 2>&1)" != 'Sorry, user'*) ]]; then
if [[ ("'$*'" =~ skip-sudo-check) || ("$(whereis sudo)" == *'/'* && "$(sudo -nv 2>&1)" != 'Sorry, user'*) ]]; then
SUDO='sudo'
else
echo "ERROR: You must either be root or be able to use sudo" >&2
#exit 5
exit 5
fi
fi

Expand All @@ -139,8 +139,8 @@ $SUDO tdnf install -y \
openssh-clients \
ca-certificates \
tar \
curl \
&& tdnf clean all
curl
$SUDO tdnf clean all

##END Check requirements and prerequisites

Expand Down