aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_utils
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-10 00:02:25 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-10 00:02:25 +0300
commit378983ff5245acbf8236941f10b5e3090ca9d4dd (patch)
tree3c80f210b78ca10251f30243407157c5a54bda3b /%HOME%/.bash_utils
parentREADME update (diff)
downloadlinux-home-378983ff5245acbf8236941f10b5e3090ca9d4dd.tar.gz
linux-home-378983ff5245acbf8236941f10b5e3090ca9d4dd.zip
bugfix
The infamous nounset & ${xs[@]+"${xs[@]}"} thing.
Diffstat (limited to '')
-rw-r--r--%HOME%/.bash_utils/cxx.sh16
-rw-r--r--%HOME%/.bash_utils/distr.sh4
-rw-r--r--%HOME%/.bash_utils/git.sh4
3 files changed, 12 insertions, 12 deletions
diff --git a/%HOME%/.bash_utils/cxx.sh b/%HOME%/.bash_utils/cxx.sh
index 527c120..92113d1 100644
--- a/%HOME%/.bash_utils/cxx.sh
+++ b/%HOME%/.bash_utils/cxx.sh
@@ -10,7 +10,7 @@ runc_flags=('-Wall' '-Wextra')
runc() (
set -o errexit -o nounset -o pipefail
- local -a c_flags=("${runc_flags[@]+"${runc_flags[@]}"}")
+ local -a c_flags=(${runc_flags[@]+"${runc_flags[@]}"})
local -a src_files
local -a prog_flags
@@ -55,10 +55,10 @@ runc() (
output_name="$( mktemp --tmpdir=. "${FUNCNAME[0]}XXX.exe" )"
gcc -o "$output_name" \
- "${c_flags[@]+"${c_flags[@]}"}" \
- "${src_files[@]+"${src_files[@]}"}"
+ ${c_flags[@]+"${c_flags[@]}"} \
+ ${src_files[@]+"${src_files[@]}"}
- "$output_name" "${prog_flags[@]+"${prog_flags[@]}"}"
+ "$output_name" ${prog_flags[@]+"${prog_flags[@]}"}
)
runcxx_flags=('-Wall' '-Wextra' '-std=c++14')
@@ -66,7 +66,7 @@ runcxx_flags=('-Wall' '-Wextra' '-std=c++14')
runcxx() (
set -o errexit -o nounset -o pipefail
- local -a cxx_flags=("${runcxx_flags[@]+"${runcxx_flags[@]}"}")
+ local -a cxx_flags=(${runcxx_flags[@]+"${runcxx_flags[@]}"})
local -a src_files
local -a prog_flags
@@ -111,8 +111,8 @@ runcxx() (
output_name="$( mktemp --tmpdir=. "${FUNCNAME[0]}XXX.exe" )"
g++ -o "$output_name" \
- "${cxx_flags[@]+"${cxx_flags[@]}"}" \
- "${src_files[@]+"${src_files[@]}"}"
+ ${cxx_flags[@]+"${cxx_flags[@]}"} \
+ ${src_files[@]+"${src_files[@]}"}
- "$output_name" "${prog_flags[@]+"${prog_flags[@]}"}"
+ "$output_name" ${prog_flags[@]+"${prog_flags[@]}"}
)
diff --git a/%HOME%/.bash_utils/distr.sh b/%HOME%/.bash_utils/distr.sh
index 58e088a..25407fb 100644
--- a/%HOME%/.bash_utils/distr.sh
+++ b/%HOME%/.bash_utils/distr.sh
@@ -35,7 +35,7 @@ update_checksums() (
fi
done
- sha1sum -- "${missing[@]+"${missing[@]}"}" >> "$checksums_path"
+ sha1sum -- ${missing[@]+"${missing[@]}"} >> "$checksums_path"
)
update_checksums_distr() (
@@ -48,7 +48,7 @@ update_checksums_distr() (
paths+=("$path")
done < <( find . -type f -\( -iname '*.exe' -o -iname '*.iso' -\) -printf '%P\0' )
- update_checksums "${paths[@]+"${paths[@]}"}"
+ update_checksums ${paths[@]+"${paths[@]}"}
)
verify_checksums() {
diff --git a/%HOME%/.bash_utils/git.sh b/%HOME%/.bash_utils/git.sh
index 54e50f6..ad7c6ee 100644
--- a/%HOME%/.bash_utils/git.sh
+++ b/%HOME%/.bash_utils/git.sh
@@ -29,7 +29,7 @@ list_repo_files() (
esac
done
- eval "${cmd[@]+"${cmd[@]}"}"
+ eval ${cmd[@]+"${cmd[@]}"}
)
list_repo_dirs() (
@@ -58,7 +58,7 @@ list_repo_dirs() (
cmd+=(--name-only HEAD)
- eval "${cmd[@]+"${cmd[@]}"}"
+ eval ${cmd[@]+"${cmd[@]}"}
)
tighten_repo_security() (