Fix quoting in clone script.
@@ -12,18 +12,18 @@ fi
for printer in "$@"; do
echo "Gathering files for $printer:"
- name="$(echo '$printer' | tr ' ' '_' | tr '[' '_' | tr ']' '_')"
+ name="$(echo "$printer" | tr ' ' '_' | tr '(' '_' | tr ')' '_' | tr '[' '_' | tr ']' '_')"
ippfind "$printer" --exec ipptool --ippserver "$name.conf" '{}' get-printer-attributes.test \; && echo " Wrote $name.conf" || echo " Failed to get attributes."
- url="$(grep printer-icons '$name.conf' | awk -F '"' '{if (NF < 5) print $2; else print $(NF-3);}')"
+ url="$(grep printer-icons "$name.conf" | awk -F '"' '{if (NF < 5) print $2; else print $(NF-3);}')"
if test "x$url" != x; then
curl "$url" -k -s -o "$name.png" && echo " Wrote $name.png" || echo " Failed to get icon from $url."
else
echo " No icon file."
fi
- url="$(grep printer-strings-uri '$name.conf' | awk -F '"' '{print $2}')"
+ url="$(grep printer-strings-uri "$name.conf" | awk -F '"' '{print $2}')"
if test "x$url" != x; then
curl "$url" -k -s -o "$name.strings" && echo " Wrote $name.strings" || echo " Failed to get strings file from $url."
else
