Merge branch 'release/5.3.0'

This commit is contained in:
Chris Down 2018-04-22 10:19:54 +01:00
commit 21cefad646

12
clipdel
View file

@ -2,7 +2,10 @@
: "${CM_DIR="${XDG_RUNTIME_DIR-"${TMPDIR-/tmp}"}"}" : "${CM_DIR="${XDG_RUNTIME_DIR-"${TMPDIR-/tmp}"}"}"
CM_REAL_DELETE=0 CM_REAL_DELETE=0
[[ $1 == -d ]] && CM_REAL_DELETE=1 if [[ $1 == -d ]]; then
CM_REAL_DELETE=1
shift
fi
major_version=5 major_version=5
@ -41,9 +44,14 @@ fi
# https://github.com/koalaman/shellcheck/issues/1141 # https://github.com/koalaman/shellcheck/issues/1141
# shellcheck disable=SC2124 # shellcheck disable=SC2124
raw_pattern=${@: -1} raw_pattern=$1
esc_pattern=${raw_pattern/\#/'\#'} esc_pattern=${raw_pattern/\#/'\#'}
if ! [[ $raw_pattern ]]; then
printf '%s\n' 'No pattern provided, see --help' >&2
exit 2
fi
exec {lock_fd}> "$lock_file" exec {lock_fd}> "$lock_file"
if (( CM_REAL_DELETE )) && [[ "$raw_pattern" == ".*" ]]; then if (( CM_REAL_DELETE )) && [[ "$raw_pattern" == ".*" ]]; then