diff options
Diffstat (limited to '%HOME%/.bash_utils')
-rw-r--r-- | %HOME%/.bash_utils/cxx.sh | 4 | ||||
-rw-r--r-- | %HOME%/.bash_utils/distr.sh | 2 | ||||
-rw-r--r-- | %HOME%/.bash_utils/path.sh | 2 | ||||
-rw-r--r-- | %HOME%/.bash_utils/text.sh | 12 |
4 files changed, 10 insertions, 10 deletions
diff --git a/%HOME%/.bash_utils/cxx.sh b/%HOME%/.bash_utils/cxx.sh index 4ff81f4..7fb9714 100644 --- a/%HOME%/.bash_utils/cxx.sh +++ b/%HOME%/.bash_utils/cxx.sh @@ -72,7 +72,7 @@ runc() ( local build_dir build_dir="$( mktemp --directory )" - trap "$( printf 'popd > /dev/null && rm -rf -- %q' "$build_dir" )" 0 + trap "$( printf -- 'popd > /dev/null && rm -rf -- %q' "$build_dir" )" 0 pushd "$build_dir" > /dev/null local output_name @@ -152,7 +152,7 @@ runcxx() ( local build_dir build_dir="$( mktemp --directory )" - trap "$( printf 'popd > /dev/null && rm -rf -- %q' "$build_dir" )" 0 + trap "$( printf -- 'popd > /dev/null && rm -rf -- %q' "$build_dir" )" 0 pushd "$build_dir" > /dev/null local output_name diff --git a/%HOME%/.bash_utils/distr.sh b/%HOME%/.bash_utils/distr.sh index 799f52f..252f86c 100644 --- a/%HOME%/.bash_utils/distr.sh +++ b/%HOME%/.bash_utils/distr.sh @@ -75,7 +75,7 @@ sums_update_distr() ( while IFS= read -d '' -r path; do paths+=("$path") - done < <( find . -type f -\( -iname '*.exe' -o -iname '*.iso' -\) -printf '%P\0' ) + done < <( find -type f -\( -iname '*.exe' -o -iname '*.iso' -\) -printf '%P\0' ) sums_update ${paths[@]+"${paths[@]}"} ) diff --git a/%HOME%/.bash_utils/path.sh b/%HOME%/.bash_utils/path.sh index 4aff550..13b5b00 100644 --- a/%HOME%/.bash_utils/path.sh +++ b/%HOME%/.bash_utils/path.sh @@ -21,7 +21,7 @@ add_missing_path() ( for path; do if str_contains "$path" ':'; then - echo "${FUNCNAME[0]}: mustn't contain colons: $path" >&2 + echo "${FUNCNAME[0]}: mustn't contain colon (':') characters: $path" >&2 return 1 fi done diff --git a/%HOME%/.bash_utils/text.sh b/%HOME%/.bash_utils/text.sh index 242837f..aefe453 100644 --- a/%HOME%/.bash_utils/text.sh +++ b/%HOME%/.bash_utils/text.sh @@ -81,13 +81,13 @@ str_starts_with() ( if [ "$#" -ne 2 ]; then echo "usage: ${FUNCNAME[0]} STR SUB" return 1 - fi + fi - local str="$1" - local sub - sub="$( printf -- '%q' "$2" )" + local str="$1" + local sub + sub="$( printf -- '%q' "$2" )" - test "$str" != "${str#$sub}" + test "$str" != "${str#$sub}" ) str_split() ( @@ -136,7 +136,7 @@ str_split() ( IFS="$old_delim" read -a xs -r <<< "$str" for x in ${xs[@]+"${xs[@]}"}; do - printf "$fmt" "$x" + printf -- "$fmt" "$x" done ) |