Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit 78012fb

Browse files
committed
Merge branch 'dev/master'
2 parents 2029cb6 + 3955de5 commit 78012fb

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.vscode/extensions.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"recommendations": [
33
"shakram02.bash-beautify", "jetmartin.bats", "timonwong.shellcheck"
4-
],
5-
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
6-
"unwantedRecommendations": [
7-
84
]
95
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.2-1
1+
4.1.3-1

src/wslu-header

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ fi
4040
# prevent bash -x
4141
set +x
4242

43-
bash_version_major=$(echo "$BASH_VERSION" | cut -d'.' -f1)
43+
bash_version_full=$(bash --version | head -n 1)
44+
bash_version_major=$(echo "$bash_version_full" | cut -d ' ' -f 4 | cut -d '.' -f 1)
45+
bash_version_minor=$(echo "$bash_version_full" | cut -d ' ' -f 4 | cut -d '.' -f 2)
4446

4547
# pipeline content to pipe... if it is wslclip
4648
if [[ "$wslu_util_name" == "wslclip" ]]; then
@@ -152,11 +154,12 @@ function error_echo {
152154
exit "$2"
153155
}
154156

155-
# Check if the major version number is greater than 5
156-
if [ "$(expr "$bash_version_major" \>= 5)" -ne 1 ]; then
157-
error_echo "You should use Bash 5 and higher; exiting." 1
157+
# Check if the version number of bash is greater or equal to 4.4
158+
if [ "$bash_version_major" -lt 4 ] || { [ "$bash_version_major" -eq 4 ] && [ "$bash_version_minor" -lt 4 ]; }; then
159+
error_echo "Bash version is too old. Please upgrade to 4.4 or later." 1
158160
fi
159161

162+
160163
# source default config
161164
if [ -f "${wslu_dest_dir}${wslu_prefix}/share/wslu/conf" ]; then
162165
debug_echo "source default setting"

0 commit comments

Comments
 (0)