Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
bonsai.sh
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
John Allbritten
bonsai.sh
Commits
d32649e0
Commit
d32649e0
authored
Mar 11, 2019
by
John A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bash >= v4.0 check
parent
b3bef593
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
bonsai.sh
bonsai.sh
+6
-0
No files found.
bonsai.sh
View file @
d32649e0
...
...
@@ -42,6 +42,12 @@ nfetch=0
changed
=()
seed
=
"
$RANDOM
"
# ensure Bash version >= 4.0
ver
=
"
$(
printf
'%s'
"
$BASH_VERSION
"
|
cut
-d
.
-f
1
)
"
if
[
-z
"
$ver
"
]
||
[
"
$ver
"
-lt
4
]
;
then
printf
'%s\n'
"Error: requires Bash v4.0 or higher. You have version
$BASH_VERSION
."
fi
# ensure MacOS compatibility with GNU getopt
if
[[
"
$OSTYPE
"
==
'darwin'
*
]]
;
then
GGETOPT
=
/usr/local/Cellar/gnu-getopt/
*
/bin/getopt
# should find gnu-getopt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment