mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 03:04:06 +00:00
fix(scripts): some typoes in scripts/shared.sh
This commit is contained in:
@@ -133,12 +133,12 @@ function get_sha256sum()
|
||||
sha256sum "$1" | head -c 64
|
||||
}
|
||||
|
||||
# Replacable file
|
||||
# Replaceable file
|
||||
#
|
||||
# $1 - filename (string)
|
||||
# $2 - filename (string)
|
||||
#
|
||||
# Returns 1 when replacable, 0 when not replacable.
|
||||
# Returns 1 when replaceable, 0 when not replaceable.
|
||||
function replacable()
|
||||
{
|
||||
FILE1="$1"
|
||||
@@ -149,7 +149,7 @@ function replacable()
|
||||
return 0
|
||||
}
|
||||
[[ ! -r "$FILE2" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "File 2 ($FILE2) does not exist, replacable"
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "File 2 ($FILE2) does not exist, replaceable"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -161,16 +161,16 @@ function replacable()
|
||||
return 0
|
||||
}
|
||||
[[ $FILE2_HASH = "" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "Could not get hash for file 2 ($FILE2), replacable"
|
||||
[[ $VERBOSE -eq 1 ]] && msg_err "Could not get hash for file 2 ($FILE2), replaceable"
|
||||
return 1
|
||||
}
|
||||
|
||||
[[ "$FILE1_HASH" == "$FILE2_HASH" ]] && {
|
||||
[[ $VERBOSE -eq 1 ]] && msg_ok "Files match, not replacable: $FILE1"
|
||||
[[ $VERBOSE -eq 1 ]] && msg_ok "Files match, not replaceable: $FILE1"
|
||||
return 0
|
||||
}
|
||||
|
||||
[[ $VERBOSE -eq 1 ]] && msg_warn "Files do not match ($FILE1_HASH != $FILE2_HASH), replacable"
|
||||
[[ $VERBOSE -eq 1 ]] && msg_warn "Files do not match ($FILE1_HASH != $FILE2_HASH), replaceable"
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user