Shellcheck remove warnings.

master
Dominik Schrempf 8 years ago
parent f9676d9add
commit 333ae6e995
  1. 21
      syncthing-resolve-conflicts

@ -15,7 +15,8 @@ plain() {
(( QUIET )) && return (( QUIET )) && return
local mesg local mesg
mesg="$1"; shift mesg="$1"; shift
printf " ${mesg}${ALL_OFF}\n" "$@" >&1 # shellcheck disable=SC2059
printf " ${mesg}${ALL_OFF}\\n" "$@" >&1
} }
msg() { msg() {
@ -23,7 +24,7 @@ msg() {
local mesg local mesg
mesg="$1"; shift mesg="$1"; shift
# shellcheck disable=SC2059 # shellcheck disable=SC2059
printf "${GREEN}==>${ALL_OFF} ${mesg}${ALL_OFF}\n" "$@" >&1 printf "${GREEN}==>${ALL_OFF} ${mesg}${ALL_OFF}\\n" "$@" >&1
} }
msg2() { msg2() {
@ -31,7 +32,7 @@ msg2() {
local mesg local mesg
mesg="$1"; shift mesg="$1"; shift
# shellcheck disable=SC2059 # shellcheck disable=SC2059
printf "${BLUE} ->${ALL_OFF} ${mesg}${ALL_OFF}\n" "$@" >&1 printf "${BLUE} ->${ALL_OFF} ${mesg}${ALL_OFF}\\n" "$@" >&1
} }
ask() { ask() {
@ -54,14 +55,14 @@ warning() {
local mesg local mesg
mesg="$1"; shift mesg="$1"; shift
# shellcheck disable=SC2059 # shellcheck disable=SC2059
printf "${YELLOW}==> $(translate "WARNING:")${ALL_OFF} ${mesg}${ALL_OFF}\n" "$@" >&2 printf "${YELLOW}==> $(translate "WARNING:")${ALL_OFF} ${mesg}${ALL_OFF}\\n" "$@" >&2
} }
error() { error() {
local mesg local mesg
mesg="$1"; shift mesg="$1"; shift
# shellcheck disable=SC2059 # shellcheck disable=SC2059
printf "${RED}==> $(translate "ERROR:")${ALL_OFF} ${mesg}${ALL_OFF}\n" "$@" >&2 printf "${RED}==> $(translate "ERROR:")${ALL_OFF} ${mesg}${ALL_OFF}\\n" "$@" >&2
} }
usage() { usage() {
@ -128,11 +129,11 @@ if [[ -t 2 && $USE_COLOR = "y" ]]; then
RED="$(tput setaf 1)" RED="$(tput setaf 1)"
YELLOW="$(tput setaf 3)" YELLOW="$(tput setaf 3)"
else else
ALL_OFF="\e[1;0m" ALL_OFF="\\e[1;0m"
BLUE="\e[1;34m" BLUE="\\e[1;34m"
GREEN="\e[1;32m" GREEN="\\e[1;32m"
RED="\e[1;31m" RED="\\e[1;31m"
YELLOW="\e[1;33m" YELLOW="\\e[1;33m"
fi fi
fi fi
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW readonly ALL_OFF BOLD BLUE GREEN RED YELLOW

Loading…
Cancel
Save