aboutsummarylogtreecommitdiffstats
path: root/addmag
diff options
context:
space:
mode:
authoraetherised2021-11-08 12:48:44 -0500
committeraetherised2021-11-08 12:48:44 -0500
commit67f8f9a8bf48c393b714afa4cab0da0ee121f155 (patch)
treeaf394d1753ae78b0f7555172cb8897b158215fac /addmag
parent17f925a4dfd2fcfd517bac4bfa1b4c403b33409e (diff)
downloadaur-67f8f9a8bf48c393b714afa4cab0da0ee121f155.tar.gz
quote config values for safety
Diffstat (limited to 'addmag')
-rwxr-xr-xaddmag5
1 files changed, 3 insertions, 2 deletions
diff --git a/addmag b/addmag
index 13fe60d453c7..dce9fb1f57e3 100755
--- a/addmag
+++ b/addmag
@@ -22,8 +22,8 @@ if [[ -z "${LINK}" ]]; then
exit 1
fi
-[[ -f "${SYSRC}" ]] && ADDR=$(cat "${SYSRC}")
-[[ -f "${USRRC}" ]] && ADDR=$(cat "${USRRC}")
+[[ -f "${SYSRC}" ]] && ADDR="$(cat "${SYSRC}")"
+[[ -f "${USRRC}" ]] && ADDR="$(cat "${USRRC}")"
if [[ -z "${ADDR}" ]]; then
echo "ERROR: no remote address configured"
echo " Place the address of the remote daemon in one of these locations:"
@@ -33,3 +33,4 @@ if [[ -z "${ADDR}" ]]; then
fi
transmission-remote "${ADDR}" -a "${LINK}"
+