X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Finstall_osm.sh;h=899adb179f7f02f1619053847c5919c64a9c39e2;hb=refs%2Fheads%2FWIM;hp=7cc47e3d837332e584d12e965d6085927f9cad97;hpb=da8a9c4fe65046e3ae854f5e7caa745528143175;p=osm%2Fdevops.git diff --git a/installers/install_osm.sh b/installers/install_osm.sh index 7cc47e3d..899adb17 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -1,6 +1,6 @@ #!/bin/bash REPOSITORY_BASE=https://osm-download.etsi.org/repository/osm/debian -RELEASE=ReleaseFIVE +RELEASE=ReleaseFIVE-daily REPOSITORY=testing add_repo() { @@ -8,6 +8,18 @@ add_repo() { grep "${REPO_CHECK/\[arch=amd64\]/\\[arch=amd64\\]}" /etc/apt/sources.list > /dev/null 2>&1 if [ $? -ne 0 ] then + need_packages_lw="software-properties-common apt-transport-https" + echo -e "Checking required packages: $need_packages_lw" + dpkg -l $need_packages_lw &>/dev/null \ + || ! echo -e "One or several required packages are not installed. Updating apt cache requires root privileges." \ + || sudo apt-get -q update \ + || ! echo "failed to run apt-get update" \ + || exit 1 + dpkg -l $need_packages_lw &>/dev/null \ + || ! echo -e "Installing $need_packages_lw requires root privileges." \ + || sudo apt-get install -y $need_packages_lw \ + || ! echo "failed to install $need_packages_lw" \ + || exit 1 wget -qO - $REPOSITORY_BASE/$RELEASE/OSM%20ETSI%20Release%20Key.gpg | sudo apt-key add - sudo DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$1" && sudo DEBIAN_FRONTEND=noninteractive apt-get update return 0 @@ -19,4 +31,4 @@ add_repo() { add_repo "deb [arch=amd64] $REPOSITORY_BASE/$RELEASE $REPOSITORY devops" sudo DEBIAN_FRONTEND=noninteractive apt-get -q update sudo DEBIAN_FRONTEND=noninteractive apt-get install osm-devops -/usr/share/osm-devops/installers/full_install_osm.sh -R $RELEASE -r $REPOSITORY -D /usr/share/osm-devops --pullimages "$@" +/usr/share/osm-devops/installers/full_install_osm.sh -R $RELEASE -r $REPOSITORY -u $REPOSITORY_BASE -D /usr/share/osm-devops -t releasefive-daily --pullimages "$@"