summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2023-01-18 10:56:26 +0600
committerJohn McCrae <john.mccrae@progress.com>2023-01-18 10:56:26 +0600
commitcfb7af9de534f8609a4cd80cc3da696eec283085 (patch)
tree3c292c1c41b82341912b81d5395502b2fff57973
parent79fe23a6285f9794506aeeed8700cc761d239565 (diff)
downloadchef-cfb7af9de534f8609a4cd80cc3da696eec283085.tar.gz
Updating zypper for openSUSE 15 on chef-17
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rwxr-xr-x.expeditor/scripts/zypper_prep.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/.expeditor/scripts/zypper_prep.sh b/.expeditor/scripts/zypper_prep.sh
new file mode 100755
index 0000000000..5e87ff0265
--- /dev/null
+++ b/.expeditor/scripts/zypper_prep.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+VERSION_STRING=$(cat /etc/os-release | grep '^VERSION=' | sed 's/VERSION=\"\([0-9]\+\).*/\1/')
+if [[ $VERSION_STRING == "15" ]]
+then
+ echo "--- :hammer_and_wrench: Updating Zypper Repos on openSUSE 15"
+ find /etc/zypp/repos.d -name "SMT-*" -execdir rm -f -- '{}' \;
+ zypper addrepo --check --priority 50 --refresh --name "Chefzypper-repo" "https://mirror.fcix.net/opensuse/distribution/leap/15.3/repo/oss/" "chefzypper"
+ zypper --gpg-auto-import-keys ref
+else
+ echo "--- :hammer_and_wrench: Not Running on openSUSE 15, nothing to do"
+fi