Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Install shellcheck and checkbashisms
run: sudo apt install shfmt shellcheck devscripts
- name: Check style
run: make check-style
run: make style-check
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ test:
clean:
${MAKE} -C tests clean

check-style: python-style-check shell-style-check
style-fix: python-style-fix shell-style-fix
style-check: python-style-check shell-style-check


PYTHON_FILES=$(wildcard *.py)

Expand All @@ -22,11 +24,11 @@ SH_SCRIPTS = $(shell grep -r -l '^\#!/bin/sh' * | grep -v .git | grep -v "~" | g
BASH_SCRIPTS = $(shell grep -r -l '^\#!/bin/bash' * | grep -v .git | grep -v "~" | grep -v cronic-orig)

shell-style-fix:
shfmt -w -i 2 -ci -bn ${SH_SCRIPTS} ${BASH_SCRIPTS}
shfmt -w -i 2 -ci -bn -sr ${SH_SCRIPTS} ${BASH_SCRIPTS}
shellcheck -x -P SCRIPTDIR --format=diff ${SH_SCRIPTS} ${BASH_SCRIPTS} | patch -p1

shell-style-check:
shfmt -d -i 2 -ci -bn ${SH_SCRIPTS} ${BASH_SCRIPTS}
shfmt -d -i 2 -ci -bn -sr ${SH_SCRIPTS} ${BASH_SCRIPTS}
shellcheck -x -P SCRIPTDIR --format=gcc ${SH_SCRIPTS} ${BASH_SCRIPTS}
checkbashisms -l ${SH_SCRIPTS} /dev/null

Expand Down
2 changes: 1 addition & 1 deletion git-find-branch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ REPO_URL=$1
shift

for BRANCH in "$@"; do
if (git ls-remote --quiet --exit-code --heads "${REPO_URL}" "${BRANCH}" >/dev/null); then
if (git ls-remote --quiet --exit-code --heads "${REPO_URL}" "${BRANCH}" > /dev/null); then
echo "${BRANCH}"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion git-find-fork
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ REPONAME=$3
# export GITEXISTS="git ls-remote"
export GITEXISTS="wget -q --spider"

if (${GITEXISTS} "https://github.com/${ORG}/${REPONAME}.git" >/dev/null); then
if (${GITEXISTS} "https://github.com/${ORG}/${REPONAME}.git" > /dev/null); then
OWNER="${ORG}"
else
OWNER="${UPSTREAM_ORG}"
Expand Down