Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5f719707
Commit
5f719707
authored
Apr 19, 2019
by
aaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shellcheck failures on clean.sh and cache_go_dirs.sh
update pull request
parent
ac1557a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
.shellcheck_failures
hack/.shellcheck_failures
+0
-2
clean.sh
hack/make-rules/clean.sh
+4
-4
cache_go_dirs.sh
hack/make-rules/helpers/cache_go_dirs.sh
+3
-3
No files found.
hack/.shellcheck_failures
View file @
5f719707
...
@@ -30,8 +30,6 @@
...
@@ -30,8 +30,6 @@
./hack/lib/swagger.sh
./hack/lib/swagger.sh
./hack/lib/test.sh
./hack/lib/test.sh
./hack/lib/version.sh
./hack/lib/version.sh
./hack/make-rules/clean.sh
./hack/make-rules/helpers/cache_go_dirs.sh
./hack/make-rules/make-help.sh
./hack/make-rules/make-help.sh
./hack/make-rules/test.sh
./hack/make-rules/test.sh
./hack/make-rules/update.sh
./hack/make-rules/update.sh
...
...
hack/make-rules/clean.sh
View file @
5f719707
...
@@ -18,7 +18,7 @@ set -o errexit
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../..
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
CLEAN_PATTERNS
=(
CLEAN_PATTERNS
=(
...
@@ -28,11 +28,11 @@ CLEAN_PATTERNS=(
...
@@ -28,11 +28,11 @@ CLEAN_PATTERNS=(
"test/e2e/generated/bindata.go"
"test/e2e/generated/bindata.go"
)
)
for
pattern
in
${
CLEAN_PATTERNS
[@]
}
;
do
for
pattern
in
"
${
CLEAN_PATTERNS
[@]
}
"
;
do
for
match
in
$(
find
"
${
KUBE_ROOT
}
"
-iregex
"^
${
KUBE_ROOT
}
/
${
pattern
}
$"
)
;
do
while
IFS
=
$'
\n
'
read
-r
-d
match
;
do
echo
"Removing
${
match
#
${
KUBE_ROOT
}
\/
}
.."
echo
"Removing
${
match
#
${
KUBE_ROOT
}
\/
}
.."
rm
-rf
"
${
match
#
${
KUBE_ROOT
}
\/
}
"
rm
-rf
"
${
match
#
${
KUBE_ROOT
}
\/
}
"
done
done
< <
(
find
"
${
KUBE_ROOT
}
"
-iregex
"^
${
KUBE_ROOT
}
/
${
pattern
}
$"
)
done
done
# ex: ts=2 sw=2 et filetype=sh
# ex: ts=2 sw=2 et filetype=sh
hack/make-rules/helpers/cache_go_dirs.sh
View file @
5f719707
...
@@ -28,7 +28,7 @@ if [[ -z "${1:-}" ]]; then
...
@@ -28,7 +28,7 @@ if [[ -z "${1:-}" ]]; then
fi
fi
CACHE
=
"
$1
"
;
shift
CACHE
=
"
$1
"
;
shift
trap
"rm -f '
${
CACHE
}
'"
HUP INT TERM ERR
trap
'rm -f "${CACHE}"'
HUP INT TERM ERR
# This is a partial 'find' command. The caller is expected to pass the
# This is a partial 'find' command. The caller is expected to pass the
# remaining arguments.
# remaining arguments.
...
@@ -62,8 +62,8 @@ if [[ -f "${CACHE}" ]]; then
...
@@ -62,8 +62,8 @@ if [[ -f "${CACHE}" ]]; then
N
=
$(
kfind
-type
d
-newer
"
${
CACHE
}
"
-print
-quit
|
wc
-l
)
N
=
$(
kfind
-type
d
-newer
"
${
CACHE
}
"
-print
-quit
|
wc
-l
)
[[
"
${
N
}
"
==
0
]]
&&
NEED_FIND
=
false
[[
"
${
N
}
"
==
0
]]
&&
NEED_FIND
=
false
fi
fi
mkdir
-p
$(
dirname
"
${
CACHE
}
"
)
mkdir
-p
"
$(
dirname
"
${
CACHE
}
"
)
"
if
$
(
"
${
NEED_FIND
}
"
)
;
then
if
$
{
NEED_FIND
}
;
then
kfind
-type
f
-name
\*
.go
\
kfind
-type
f
-name
\*
.go
\
|
sed
's|/[^/]*$||'
\
|
sed
's|/[^/]*$||'
\
|
sed
's|^./||'
\
|
sed
's|^./||'
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment