Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bastien Durel
rand
Commits
e008d96f
Verified
Commit
e008d96f
authored
Jul 26, 2019
by
Bastien Durel
Browse files
missing checksize script
parent
e1082d01
Pipeline
#979
passed with stages
in 4 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
checksize
0 → 100755
View file @
e008d96f
#!/bin/sh
if
[
!
-f
$2
]
;
then
exit
0
;
fi
if
[
!
-f
$1
]
;
then
exit
0
;
fi
bin
=
$(
stat
-c
%s
$1
)
comp
=
$(
stat
-c
%s
$2
)
if
[
$bin
-gt
$comp
]
;
then
## check margin
echo
"Compressed file is smaller than original by a factor of
$(
echo
$comp
/
$bin
| bc
-l
)
"
c
=
$(
echo
"
$bin
*99/100"
| bc
)
if
[
$c
-gt
$comp
]
;
then
echo
"Compression achieved more than 1%"
exit
1
fi
fi
exit
0
Write
Preview
Supports
Markdown
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