Skip to content

Commit

Permalink
fix some shellcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bfontaine committed Mar 25, 2024
1 parent b6fef41 commit 10d7be6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rfc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ __rfc() {
}

get_ftp_url() {
local tmp=$(mktemp)
local tmp
tmp=$(mktemp)
# $1 = pattern of the file we're looking for
local pattern=$1
local fetch_exit_code=
Expand All @@ -75,7 +76,7 @@ __rfc() {
# Lines have the following format:
# <li><a href="RFCs0001-0500.tar.gz"> RFCs0001-0500.tar.gz</a></li>
# We want this __^^^^^^^^^^^^^^^^^^^^
cat "$tmp" | grep "$pattern" | cut -d'"' -f2
< "$tmp" grep "$pattern" | cut -d'"' -f2
}

get_rfc() {
Expand All @@ -89,8 +90,8 @@ __rfc() {
}

init_rfc_dir() {
mkdir -p $rfc_dir
touch $rfc_dir/_404s
mkdir -p "$rfc_dir"
touch "$rfc_dir"/_404s
}

print_not_found_error() {
Expand Down Expand Up @@ -170,6 +171,7 @@ __rfc() {

# rfc help
print_usage() {
# shellcheck disable=SC2016
echo 'Usage:
rfc --version # display the version number and exit
rfc --help # display this text and exit
Expand Down

0 comments on commit 10d7be6

Please sign in to comment.