|
|
@ -129,7 +129,7 @@ install_file() { |
|
|
|
cat > "${tmpfile}" || return 1 |
|
|
|
mkdir -vp "${path%/*}" || exit 1 |
|
|
|
if [[ -e "$path" ]]; then |
|
|
|
if ! diff "${tmpfile}" "${path}";then |
|
|
|
if ! diff "${tmpfile}" "${path}" >/dev/null 2>&1;then |
|
|
|
info "File '$path' exists but is different, archiving current content and replacing it." |
|
|
|
candidate="${path}.bak" |
|
|
|
n=1 |
|
|
@ -189,7 +189,7 @@ fetch_binary() { |
|
|
|
echo " .. ${RED}Failed${NORMAL} (fetched content is HTML !?!)." >&2 |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
if [ -e "$BIN_PATH/$name" ] && diff "$tmpfile" "$BIN_PATH/$name" >/dev/null; then |
|
|
|
if [ -e "$BIN_PATH/$name" ] && diff "$tmpfile" "$BIN_PATH/$name" >/dev/null 2>&1; then |
|
|
|
echo " .. ${GREEN}Done${NORMAL} (File '$BIN_PATH/$name' was already up to date.)" >&2 |
|
|
|
else |
|
|
|
mv "$tmpfile" "$BIN_PATH/$name" && |
|
|
|