mirror of
https://github.com/dynup/kpatch
synced 2024-12-24 14:12:06 +00:00
Merge pull request #170 from jpoimboe/module-special-chars
kpatch-build: replace special characters in module name
This commit is contained in:
commit
66cab1d4a2
@ -146,6 +146,10 @@ if [[ "$PATCHNAME" =~ \.patch ]] || [[ "$PATCHNAME" =~ \.diff ]]; then
|
||||
PATCHNAME="${PATCHNAME%.*}"
|
||||
fi
|
||||
|
||||
# Only allow alphanumerics and '_' and '-' in the module name.
|
||||
# Everything else is replaced with '-'.
|
||||
PATCHNAME=${PATCHNAME//[^a-zA-Z0-9_-]/-}
|
||||
|
||||
TEMPDIR="$(mktemp -d /tmp/kpatch-build-XXXXXX)" || die "mktemp failed"
|
||||
|
||||
trap cleanup EXIT INT TERM
|
||||
|
Loading…
Reference in New Issue
Block a user