diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-08-19 18:02:16 +0200 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-08-19 18:02:16 +0200 |
commit | a7ecdcf5d0d55e8e695d5724c579f89ca2704f87 (patch) | |
tree | 0cfea1e3d2f5e87d5e3dc4ee3b139c546f50875d | |
parent | 5267e85792ae0c03106405bb8b3b7150f027c935 (diff) | |
download | midipix_build-a7ecdcf5d0d55e8e695d5724c579f89ca2704f87.tar.bz2 midipix_build-a7ecdcf5d0d55e8e695d5724c579f89ca2704f87.tar.xz |
Switch to portable [!...] vs. [^...] patterns.
-rw-r--r-- | subr.rtl/rtl_complex.subr | 10 | ||||
-rw-r--r-- | subr.rtl/rtl_string.subr | 12 | ||||
-rw-r--r-- | subr/build_init.subr | 4 | ||||
-rw-r--r-- | subr/ex_pkg_restart.subr | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/subr.rtl/rtl_complex.subr b/subr.rtl/rtl_complex.subr index f315fd90..1e13fce7 100644 --- a/subr.rtl/rtl_complex.subr +++ b/subr.rtl/rtl_complex.subr @@ -36,11 +36,11 @@ rtl_filter_vars() { fi; continue; ;; *) case "${_var_spec}" in - [^=]*=\"*\") _qchar=""; _vname="${_var_spec%%=\"*}"; ;; - [^=]*=\"*) _qchar="\""; _vname="${_var_spec%%=\"*}"; ;; - [^=]*=\'*\') _qchar=""; _vname="${_var_spec%%=\'*}"; ;; - [^=]*=\'*) _qchar="\'"; _vname="${_var_spec%%=\'*}"; ;; - [^=]*=*) _qchar=""; _vname="${_var_spec%%=*}"; ;; + [!=]*=\"*\") _qchar=""; _vname="${_var_spec%%=\"*}"; ;; + [!=]*=\"*) _qchar="\""; _vname="${_var_spec%%=\"*}"; ;; + [!=]*=\'*\') _qchar=""; _vname="${_var_spec%%=\'*}"; ;; + [!=]*=\'*) _qchar="\'"; _vname="${_var_spec%%=\'*}"; ;; + [!=]*=*) _qchar=""; _vname="${_var_spec%%=*}"; ;; esac; ;; esac; if "${_fn}" "${_vname}"; then diff --git a/subr.rtl/rtl_string.subr b/subr.rtl/rtl_string.subr index e642bebe..e3e98601 100644 --- a/subr.rtl/rtl_string.subr +++ b/subr.rtl/rtl_string.subr @@ -71,10 +71,10 @@ rtl_tolower() { X*) _s_new="${_s_new:+${_s_new}}x"; _s="${_s#X}"; ;; Y*) _s_new="${_s_new:+${_s_new}}y"; _s="${_s#Y}"; ;; Z*) _s_new="${_s_new:+${_s_new}}z"; _s="${_s#Z}"; ;; - [^ABCDEFGHIJKLMNOPQRSTUVWXYZ]*) + [!ABCDEFGHIJKLMNOPQRSTUVWXYZ]*) _s_new="${_s_new:+${_s_new}}${_s%%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]*}"; - while [ "${_s#[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]}" != "${_s}" ]; do - _s="${_s#[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]}"; + while [ "${_s#[!ABCDEFGHIJKLMNOPQRSTUVWXYZ]}" != "${_s}" ]; do + _s="${_s#[!ABCDEFGHIJKLMNOPQRSTUVWXYZ]}"; done; ;; esac; done; printf "%s" "${_s_new}"; @@ -110,10 +110,10 @@ rtl_toupper() { x*) _s_new="${_s_new:+${_s_new}}X"; _s="${_s#x}"; ;; y*) _s_new="${_s_new:+${_s_new}}Y"; _s="${_s#y}"; ;; z*) _s_new="${_s_new:+${_s_new}}Z"; _s="${_s#z}"; ;; - [^abcdefghijklmnopqrstuvwxyz]*) + [!abcdefghijklmnopqrstuvwxyz]*) _s_new="${_s_new:+${_s_new}}${_s%%[abcdefghijklmnopqrstuvwxyz]*}"; - while [ "${_s#[^abcdefghijklmnopqrstuvwxyz]}" != "${_s}" ]; do - _s="${_s#[^abcdefghijklmnopqrstuvwxyz]}"; + while [ "${_s#[!abcdefghijklmnopqrstuvwxyz]}" != "${_s}" ]; do + _s="${_s#[!abcdefghijklmnopqrstuvwxyz]}"; done; ;; esac; done; printf "%s" "${_s_new}"; diff --git a/subr/build_init.subr b/subr/build_init.subr index 2d78da91..1e0c7d18 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -191,8 +191,8 @@ buildp_init_getopts() { fi; case "${_arg}" in *=*) rtl_set_var_unsafe "${_arg%%=*}" "${_arg#*=}"; ;; - [^a-zA-Z]*) _rc=1; _status="Error: build group names must start with [a-zA-Z] (in argument \`${_arg}'.)"; ;; - *[^_a-zA-Z]*) _rc=1; _status="Error: build group names must not contain [^_a-zA-Z] (in argument \`${_arg}'.)"; ;; + [!a-zA-Z]*) _rc=1; _status="Error: build group names must start with [a-zA-Z] (in argument \`${_arg}'.)"; ;; + *[!_a-zA-Z]*) _rc=1; _status="Error: build group names must not contain [!_a-zA-Z] (in argument \`${_arg}'.)"; ;; *) BUILD_GROUPS="$(rtl_lconcat "${BUILD_GROUPS}" "${_arg}")"; ;; esac; shift; fi; diff --git a/subr/ex_pkg_restart.subr b/subr/ex_pkg_restart.subr index d6f2bee5..9e51df8b 100644 --- a/subr/ex_pkg_restart.subr +++ b/subr/ex_pkg_restart.subr @@ -150,7 +150,7 @@ exp_pkg_expand_restart_at_virtual() { _epera_at="${1}"; shift; if [ "${_epera_at#@}" != "${_epera_at}" ]; then _epera_at="${_epera_at#@}"; - if [ "${_epera_at%[^0-9a-zA-Z_]*}" != "${_epera_at}" ]; then + if [ "${_epera_at%[!0-9a-zA-Z_]*}" != "${_epera_at}" ]; then _status="invalid virtual build step \`${_epera_at}'"; _epera_rc=1; elif eval [ '"${'"${_epera_rset}${_epera_at}"':+1}"' = 1 ]; then eval _epera_at='${'"${_epera_rset}${_epera_at}"'}'; |