aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2022-04-29 15:58:18 +0200
committerEinhard Leichtfuß <alguien@respiranto.de>2022-04-29 15:58:18 +0200
commit4983b8fdf822557fa2bee4d12e690da5cfc43fdf (patch)
tree65c52455bee04eede4d68e61d1e1ec132732abdd
parentcd11e4fa81c13aecf84f3b82de568b4b074ac113 (diff)
Consistent quoting (again)
-rw-r--r--basic.bash6
-rwxr-xr-xmake_install.bash6
-rwxr-xr-xupdate.bash2
3 files changed, 7 insertions, 7 deletions
diff --git a/basic.bash b/basic.bash
index 643c39d..363df0b 100644
--- a/basic.bash
+++ b/basic.bash
@@ -36,8 +36,8 @@ script_dir="${script_path%/*}"
function init
{
tmp_d="$(mktemp -d)"
- tmp="$tmp_d/a"
- tmp_="$tmp_d/b"
+ tmp="${tmp_d}/a"
+ tmp_="${tmp_d}/b"
}
# $1: file to treat as input: filename
@@ -81,7 +81,7 @@ function replace_line
sed -Ei "
/${1}/ {
- r $tmp_
+ r ${tmp_}
d
}
" "$tmp"
diff --git a/make_install.bash b/make_install.bash
index 1df6acb..fac838f 100755
--- a/make_install.bash
+++ b/make_install.bash
@@ -29,7 +29,7 @@ function main
{
if [ "$#" -lt 2 ]
then
- echo "Usage: $0 <base_dir> <type> (<xy>-<zw>|-a)" >&2
+ echo "Usage: ${0} <base_dir> <type> (<xy>-<zw>|-a)" >&2
exit 1
elif [ "$#" -gt 2 ]
then
@@ -52,7 +52,7 @@ function main
make_install
done
else
- lang=$3
+ lang="$3"
make_install
fi
}
@@ -65,7 +65,7 @@ function main
#
function make_install
{
- pkgname=dict-freedict-${lang}${ext}
+ pkgname="dict-freedict-${lang}${ext}"
input "${script_dir}/sample.install"
replace "%LANG%" "$lang"
diff --git a/update.bash b/update.bash
index 324dfa1..208d7f2 100755
--- a/update.bash
+++ b/update.bash
@@ -40,7 +40,7 @@ function main
{
if [ "$#" -lt 2 ]
then
- echo "Usage: $0 <base_dir> <type> [--nopull] [-u <xy>-<zw>|-ua|-uaf]" >&2
+ echo "Usage: ${0} <base_dir> <type> [--nopull] [-u <xy>-<zw>|-ua|-uaf]" >&2
exit 1
else
cd "$1" || exit 1