Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
cd5a5c00
Commit
cd5a5c00
authored
Jun 23, 2022
by
Medicean
Committed by
Medicean
Jul 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance: Core/CMDLinux) support filehash
parent
d7b6e85c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
filemanager.js
source/core/cmdlinux/template/filemanager.js
+16
-1
No files found.
source/core/cmdlinux/template/filemanager.js
View file @
cd5a5c00
...
@@ -80,6 +80,21 @@ module.exports = (arg1, arg2, arg3) => ({
...
@@ -80,6 +80,21 @@ module.exports = (arg1, arg2, arg3) => ({
},
},
filehash
:
{
filehash
:
{
_
:
``
.
replace
(
/
\n\s
+/g
,
''
),
_
:
`command_exists() { command -v "$@" > /dev/null 2>&1; };
if command_exists md5sum; then
asmd5=$(md5sum #{path}|awk '{print $1}');
echo -n "MD5\\t$asmd5\\n";
elif command_exists busybox && busybox --list-modules | grep -q md5sum; then
asmd5=$(busybox md5sum #{path}|awk '{print $1}');
echo -n "MD5\\t$asmd5\\n";
fi;
if command_exists sha1sum; then
assha1=$(sha1sum #{path}|awk '{print $1}');
echo -n "SHA1\\t$assha1\\n";
elif command_exists busybox && busybox --list-modules | grep -q sha1sum; then
assha1=$(busybox sha1sum #{path}|awk '{print $1}');
echo -n "SHA1\\t$assha1\\n";
fi;
`
.
replace
(
/
\n\s
+/g
,
''
),
},
},
})
})
\ No newline at end of file
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