Merge pull request #97 from spartacus06/mkdir-install

Ensure install directory exists
This commit is contained in:
Josh Poimboeuf 2014-03-28 13:20:27 -07:00
commit 3e08618447
1 changed files with 2 additions and 1 deletions

View File

@ -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"
;; ;;