Make shellcheck happy
This commit is contained in:
parent
3fc545381c
commit
5790857b95
@ -64,6 +64,7 @@ die() {
|
|||||||
javascript_escape() {
|
javascript_escape() {
|
||||||
# print the first argument in an escaped way, such that it can safely
|
# print the first argument in an escaped way, such that it can safely
|
||||||
# be used within javascripts double quotes
|
# be used within javascripts double quotes
|
||||||
|
# shellcheck disable=SC2001
|
||||||
sed "s,[\\\\'\"],\\\\&,g" <<< "$1"
|
sed "s,[\\\\'\"],\\\\&,g" <<< "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ simplify_url() {
|
|||||||
# are found:
|
# are found:
|
||||||
no_entries_found() {
|
no_entries_found() {
|
||||||
while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do
|
while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do
|
||||||
|
# shellcheck disable=SC2001
|
||||||
shorter_simple_url=$(sed 's,^[^.]*\.,,' <<< "$simple_url")
|
shorter_simple_url=$(sed 's,^[^.]*\.,,' <<< "$simple_url")
|
||||||
if [ "$shorter_simple_url" = "$simple_url" ] ; then
|
if [ "$shorter_simple_url" = "$simple_url" ] ; then
|
||||||
# if no dot, then even remove the top level domain
|
# if no dot, then even remove the top level domain
|
||||||
|
Loading…
Reference in New Issue
Block a user