Skip to content

Commit

Permalink
Merge branch 'add_alpine_pipeline' of github.com:liveans/msquic into …
Browse files Browse the repository at this point in the history
…add_alpine_pipeline
  • Loading branch information
liveans committed Sep 27, 2024
2 parents 1bc9868 + 3f98718 commit 88c1286
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions scripts/docker-script.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#! /bin/sh

if [[ $(id -u) -ne 0 ]];
then
#Beware of how you compose the command
if [ $(id -u) -ne 0 ]; then
# Beware of how you compose the command
echo "This script must be run as root. Running the script with sudo..."
printf -v cmd_str '%q ' "$0" "$@"
exec sudo su -c "$cmd_str"
Expand Down Expand Up @@ -62,28 +61,27 @@ install_libmsquic_alpine()
find -name "libmsquic*.apk" -exec apk add --allow-untrusted {} \;
}

if [[ "$OS" == "ubuntu" ]] || [[ "$OS" == "debian" ]]; then
if [ "$OS" = "ubuntu" ] || [ "$OS" = "debian" ]; then
install_dependencies_apt
elif [[ "$OS" == "centos" ]] || [[ "$OS" == "almalinux" ]] || [[ "$OS" == "rhel" ]] || [[ "$OS" == "fedora" ]]; then
elif [ "$OS" = "centos" ] || [ "$OS" = "almalinux" ] || [ "$OS" = "rhel" ] || [ "$OS" = "fedora" ]; then
install_dependencies_rpm
elif [[ "$OS" == 'opensuse-leap' ]]; then
elif [ "$OS" = 'opensuse-leap' ]; then
install_dependencies_opensuse
elif [[ "$OS" == 'azurelinux' ]] || [[ "$OS" == 'mariner' ]]; then
elif [ "$OS" = 'azurelinux' ] || [ "$OS" = 'mariner' ]; then
install_libmsquic_azure_linux
elif [[ "$OS" == 'alpine' ]]; then
elif [ "$OS" = 'alpine' ]; then
install_libmsquic_alpine
else
echo "Unsupported OS: ${OS}"
exit 1
fi

set -e
if [[ "$OS" != 'alpine' ]]; then
if ! [ "$OS" = 'alpine' ]; then
chmod +x artifacts/bin/linux/${1}_${2}_${3}/msquictest
artifacts/bin/linux/${1}_${2}_${3}/msquictest --gtest_filter=ParameterValidation.ValidateApi
fi


# Install .NET if it is not installed
if ! [ -f /usr/bin/dotnet ]; then
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
Expand Down

0 comments on commit 88c1286

Please sign in to comment.