@@ -234,7 +234,7 @@ build_pkgs_fn()
234234 echo ' Installing required apt packages'
235235 echo ' =================================='
236236
237- pkgs=(build-essential curl flex bison dwarves gcc g++ gcc-12 g++-12 jq libssl-dev libelf-dev)
237+ pkgs=(build-essential curl flex bison dwarves gcc g++ gcc-12 g++-12 jq libssl-dev libelf-dev bc )
238238
239239 for pkg in ${pkgs[@]}
240240 do
@@ -261,42 +261,12 @@ build_pkgs_fn()
261261# install required apt packages
262262build_pkgs_fn
263263
264- git_1_fn ()
265- {
266- # SCRAPE GITHUB WEBSITE FOR LATEST REPO VERSION
267- gh_repo=" $1 "
268- gh_url=" $2 "
269-
270- if curl_cmd=" $( curl -m ' 5' -sSL " https://api.github.com/repos/$gh_repo /$gh_url " ) " ; then
271- g_ver=" $( echo " $curl_cmd " | jq -r ' .[0].name' ) "
272- g_ver=" ${g_ver##* } "
273- g_url=" $( echo " $curl_cmd " | jq -r ' .[0].tarball_url' ) "
274- fi
275- }
276-
277- git_ver_fn ()
278- {
279- local gv_url v_flag v_tag v_url url_tag
280-
281- v_url=" $1 "
282- v_tag=" $2 "
283-
284- if [ -n " $3 " ]; then v_flag=" $3 " ; fi
285-
286- if [ " $v_flag " = ' T' ] && [ " $v_tag " = ' 1' ]; then
287- url_tag=' git_1_fn' gv_url=' tags'
288- elif [ " $v_flag " = ' R' ] && [ " $v_tag " = ' 1' ]; then
289- url_tag=' git_1_fn' ; gv_url=' releases'
290- fi
291-
292- " $url_tag " " $v_url " " $gv_url " 2> /dev/null
293- }
264+ VERSION=5.15.123.1
294265
295- git_ver_fn ' microsoft/WSL2-Linux-Kernel' ' 1' ' R'
296- if build ' wsl2-linux-kernel' " $g_ver " ; then
297- download " $g_url " " $g_ver .tar.gz"
266+ if build ' wsl2-linux-kernel' " linux-msft-wsl-${VERSION} " ; then
267+ download " https://api.github.com/repos/microsoft/WSL2-Linux-Kernel/tarball/linux-msft-wsl-${VERSION} " " linux-msft-wsl-${VERSION} .tar.gz"
298268 echo ' yes' | make KCONFIG_CONFIG=../config-wsl -j " $cpu_cores "
299- build_done ' wsl2-linux-kernel' " $g_ver "
269+ build_done ' wsl2-linux-kernel' " linux-msft-wsl- ${VERSION} "
300270fi
301271
302272exit_fn
0 commit comments