mirror of https://github.com/dynup/kpatch
Merge pull request #97 from spartacus06/mkdir-install
Ensure install directory exists
This commit is contained in:
commit
3e08618447
|
@ -140,7 +140,8 @@ case "$1" in
|
||||||
[[ "$#" -ne 2 ]] && usage
|
[[ "$#" -ne 2 ]] && usage
|
||||||
PATCH="$2"
|
PATCH="$2"
|
||||||
[[ -e "$PATCH" ]] || die "$PATCH doesn't exist"
|
[[ -e "$PATCH" ]] || die "$PATCH doesn't exist"
|
||||||
[[ ${PATCH: -3} == ".ko" ]] || "$PATCH isn't a .ko file"
|
[[ ${PATCH: -3} == ".ko" ]] || die "$PATCH isn't a .ko file"
|
||||||
|
mkdir -p "$USERDIR" || die "failed to create install directory"
|
||||||
cp -f "$PATCH" "$USERDIR" || die "failed to install patch $PATCH"
|
cp -f "$PATCH" "$USERDIR" || die "failed to install patch $PATCH"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue