Skip to content

Commit

Permalink
Fix broken pipe and other refactors (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolkonepiu authored Oct 11, 2023
1 parent 1f0bdd5 commit a99a1a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<!-- markdownlint-disable -->
<div align='center'>
<!-- markdownlint-enable -->
<div align='center'><!-- markdownlint-disable-line -->

# keencli

Expand All @@ -25,9 +23,7 @@ Bash script to control Keenetic routers via HTTP API

---

<!-- markdownlint-disable -->
</div>
<!-- markdownlint-enable -->
</div><!-- markdownlint-disable-line -->

## Requirements

Expand Down
3 changes: 2 additions & 1 deletion src/lib/http/get_http_status_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ function get_http_status_code() {
response="${1:?response must be set}"

echo "${response}" |
head -n 1 |
tail -n +1 |
head -1 |
grep -e "^HTTP" |
awk -F " " '{print $2}'
}
2 changes: 0 additions & 2 deletions src/lib/validations/validate_base_url.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# shellcheck shell=bash

base_url_regex="^https?:\/\/((([0-9]{1,3}\.){3}[0-9]{1,3})|([a-zA-Z0-9.-]+(\.[a-zA-Z]{2,4}){1,2}))(:[0-9]+)?$"

validate_base_url() {
Expand Down

0 comments on commit a99a1a6

Please sign in to comment.