Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
62feaab7
Commit
62feaab7
authored
10 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
Add "portable" md5sum and sha512sum scripts
parent
3a6561a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+4
-1
4 additions, 1 deletion
Makefile
scripts/md5sum.sh
+18
-0
18 additions, 0 deletions
scripts/md5sum.sh
scripts/sha512sum.sh
+20
-0
20 additions, 0 deletions
scripts/sha512sum.sh
with
42 additions
and
1 deletion
Makefile
+
4
−
1
View file @
62feaab7
...
...
@@ -213,6 +213,9 @@ dirclean: FORCE
export
GLUON_GENERATE
:=
$(
GLUONDIR
)
/scripts/generate.sh
export
GLUON_CONFIGURE
:=
$(
GLUONDIR
)
/scripts/configure.pl
export
MD5SUM
:=
$(
GLUONDIR
)
/scripts/md5sum.sh
export
SHA512SUM
:=
$(
GLUONDIR
)
/scripts/sha512sum.sh
download
:
FORCE
+
$(
SUBMAKE
)
tools/download
...
...
@@ -342,7 +345,7 @@ manifest: FORCE
[
-e
"
$$
file"
]
&&
echo
\
'
$(
GLUON_
$(
profile
)
_MODEL_
$(
model
))
'
\
"
$$(
echo "
$$
file
" | sed -n -r -e 's/^gluon-
$(
call regex-escape,
$(
GLUON_SITE_CODE
))
-(.*
)
-
$(
call regex-escape,
$(
GLUON_
$(
profile
)
_MODEL_
$(
model
)))
-sysupgrade
\.
bin
$$
/
\1
/p'
)
"
\
"
$$(
sha512sum "
$$
file
" | awk '{print
$$
1
}
'
)
"
\
"
$$(
$(
SHA512SUM
)
"
$$
file
"
)
"
\
"
$$
file"
&&
break
;
\
done
;
\
)
\
...
...
This diff is collapsed.
Click to expand it.
scripts/md5sum.sh
0 → 100755
+
18
−
0
View file @
62feaab7
#!/bin/sh
check_command
()
{
which
$1
>
/dev/null 2>&1
}
if
check_command
md5sum
;
then
ret
=
"
$(
md5sum
"
$@
"
)
"
elif
check_command md5
;
then
ret
=
"
$(
md5
-q
"
$@
"
)
"
else
echo
"
$0
: no suitable md5sum implementation was found"
>
&1
exit
1
fi
[
"
$?
"
-eq
0
]
||
exit
1
echo
"
$ret
"
|
awk
'{ print $1 }'
This diff is collapsed.
Click to expand it.
scripts/sha512sum.sh
0 → 100755
+
20
−
0
View file @
62feaab7
#!/bin/sh
check_command
()
{
which
$1
>
/dev/null 2>&1
}
if
check_command
sha512sum
;
then
ret
=
"
$(
sha512sum
"
$@
"
)
"
elif
check_command shasum
;
then
ret
=
"
$(
shasum
-a
512
"
$@
"
)
"
elif
check_command
cksum
;
then
ret
=
"
$(
cksum
-q
-a
sha512
"
$@
"
)
"
else
echo
"
$0
: no suitable sha512sum implementation was found"
>
&1
exit
1
fi
[
"
$?
"
-eq
0
]
||
exit
1
echo
"
$ret
"
|
awk
'{ print $1 }'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment