Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
802f9cb4
Commit
802f9cb4
authored
Apr 26, 2014
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scripts: styles
parent
0558d56b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
scripts/devcompile.sh
scripts/devcompile.sh
+7
-10
No files found.
scripts/devcompile.sh
View file @
802f9cb4
...
@@ -10,25 +10,22 @@ WARN_COLOR="\x1b[33;01m"
...
@@ -10,25 +10,22 @@ WARN_COLOR="\x1b[33;01m"
# http://stackoverflow.com/questions/4023830/bash-how-compare-two-strings-in-version-format
# http://stackoverflow.com/questions/4023830/bash-how-compare-two-strings-in-version-format
verify_go
()
{
verify_go
()
{
if
[[
$1
==
$2
]]
if
[[
$1
==
$2
]]
;
then
then
return
0
return
0
fi
fi
local
IFS
=
.
local
IFS
=
.
local
i
ver1
=(
$1
)
ver2
=(
$2
)
local
i
ver1
=(
$1
)
ver2
=(
$2
)
for
((
i
=
${#
ver1
[@]
}
;
i<
${#
ver2
[@]
}
;
i++
))
for
((
i
=
${#
ver1
[@]
}
;
i<
${#
ver2
[@]
}
;
i++
))
;
do
do
ver1[i]
=
0
ver1[i]
=
0
done
done
for
((
i
=
0
;
i<
${#
ver1
[@]
}
;
i++
))
do
for
((
i
=
0
;
i<
${#
ver1
[@]
}
;
i++
))
;
do
if
[[
-z
${
ver2
[i]
}
]]
if
[[
-z
${
ver2
[i]
}
]]
;
then
then
ver2[i]
=
0
ver2[i]
=
0
fi
fi
if
((
10#
${
ver1
[i]
}
>
10#
${
ver2
[i]
}
))
if
((
10#
${
ver1
[i]
}
>
10#
${
ver2
[i]
}
))
;
then
then
echo
-e
"
${
ERROR_COLOR
}
==> Required Go version
$1
not installed. Found
$2
instead"
echo
-e
"
${
ERROR_COLOR
}
==> Required Go version
$1
not installed. Found
$2
instead"
exit
1
exit
1
fi
fi
...
...
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