diff --git a/.travis.yml b/.travis.yml index 6fb2d61..f6a1b05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,3 @@ -language: c -install: - - sudo apt-get update -qq - - sudo apt-get install -q vim-common file libffi6 libgmp10 - - curl -L "http://archive.ubuntu.com/ubuntu/pool/universe/s/shellcheck/shellcheck_0.4.6-1_amd64.deb" -o "/tmp/shellcheck_0.4.6-1_amd64.deb" - - '[ "$(openssl dgst -sha256 "/tmp/shellcheck_0.4.6-1_amd64.deb" | cut -d " " -f 2)" == "95b4d2577f25ae47918bd53068a5ff42d5c34e5f884daa8dae32253044b45370" ]' - - sudo dpkg -i "/tmp/shellcheck_0.4.6-1_amd64.deb" +language: shell +dist: bionic script: make && make test SHELL="bash -x" diff --git a/google-font-download b/google-font-download index 73edda5..8e54160 100755 --- a/google-font-download +++ b/google-font-download @@ -349,6 +349,7 @@ if [ "$(echo "test" | sed -E 's/([st]+)$/xx\1/' 2>/dev/null)" == "texxst" ]; the elif [ "$(echo "test" | sed -r 's/([st]+)$/xx\1/' 2>/dev/null)" == "texxst" ]; then ESED="sed -r" else + # shellcheck disable=SC2230 err_exit "$(which sed) seems to lack extended regex support with -E or -r" fi @@ -431,7 +432,7 @@ for family in "${families[@]}"; do # For each requested font format, download the font file and print the corresponding CSS statements. for ((uaidx=0; uaidx < ${#formats[@]}; uaidx++)); do uakey=${formats[$uaidx]} - if [ $uaidx -eq $(( ${#formats[@]} - 1 )) ]; then + if [ "$uaidx" -eq $(( ${#formats[@]} - 1 )) ]; then terminator=";" else terminator=","