Commit b01d03aa authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.64.42

parent 39f0a5ee
......@@ -34,7 +34,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.64.41"
EPMVERSION="3.64.42"
# package, single (file), pipe, git
EPMMODE="package"
......@@ -255,7 +255,8 @@ rihas()
startwith()
{
# rhas "$1" "^$2"
[[ "$1" = ${2}* ]]
[ "${1:0:${#2}}" = "$2" ]
#[[ "$1" = ${2}* ]]
}
is_abs_path()
......@@ -727,6 +728,31 @@ regexp_subst()
sed -i -r -e "$expression" "$@"
}
get_filesize()
{
if stat -f%z "$1" >/dev/null 2>&1; then
stat -f%z "$1"
else
# coreutils
stat -c%s "$1"
fi
}
is_file_greater_2gb() {
local size
size=$(get_filesize "$1") || return
local limit=2147483648
[ $size -ge $limit ]
}
is_file_greater_4gb() {
local size
size=$(get_filesize "$1") || return
local limit=4294967296
[ $size -ge $limit ]
}
try_assure_exists()
{
local package="$2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment