Skip to content

Commit

Permalink
Merge branch 'dev/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick330602 committed Apr 10, 2024
2 parents 2029cb6 + 3955de5 commit 78012fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"recommendations": [
"shakram02.bash-beautify", "jetmartin.bats", "timonwong.shellcheck"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.2-1
4.1.3-1
11 changes: 7 additions & 4 deletions src/wslu-header
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ fi
# prevent bash -x
set +x

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

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

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


# source default config
if [ -f "${wslu_dest_dir}${wslu_prefix}/share/wslu/conf" ]; then
debug_echo "source default setting"
Expand Down

0 comments on commit 78012fb

Please sign in to comment.