File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1717 identifier : fedora
1818 uname_pattern : \.fc[0-9]+\.
1919 uname_version_pattern : " [0-9]+"
20+
21+ - name : SLES
22+ identifier : sles
Original file line number Diff line number Diff line change @@ -60,8 +60,13 @@ install_deps()
6060 if ! command -v wget > /dev/null 2>&1 ; then
6161 if command -v yum > /dev/null 2>&1 ; then
6262 yum install -y wget
63- else
63+ elif command -v apt > /dev/null 2>&1 ; then
6464 apt install -y wget
65+ elif command -v zypper > /dev/null 2>&1 ; then
66+ zypper install -y wget
67+ else
68+ echo " Missing wget, and do not know what package manager is being used, exiting out"
69+ exit 1
6570 fi
6671 fi
6772
@@ -115,10 +120,15 @@ parse_uname()
115120 local identifier=` yq -r " .[$i ].identifier" $config `
116121 local ver_pattern=` yq -r " .[$i ].uname_version_pattern" $config `
117122
118- if [ -z ver_pattern ]; then
123+ if [ -z " $ ver_pattern" ]; then
119124 echo $identifier has no uname_version_pattern, skipping
120125 continue
121126 fi
127+
128+ if [ -z " $pattern " ]; then
129+ echo $identifier has no uname_pattern, skipping
130+ continue
131+ fi
122132
123133 local os_match=` echo $kinfo | grep -Eo $pattern `
124134
You can’t perform that action at this time.
0 commit comments