forked from kiss-community/kiss
kiss: rewrite install input
This commit is contained in:
parent
0c51261486
commit
5f93bfef55
22
kiss
22
kiss
@ -1262,18 +1262,20 @@ pkg_install() {
|
||||
|
||||
# Install can also take the full path to a tarball. We don't need to check
|
||||
# the repository if this is the case.
|
||||
if [ -f "$1" ] && [ -z "${1%%*.tar.*}" ]; then
|
||||
tar_file=$1 pkg_name=${1##*/} pkg_name=${pkg_name%[#@]*}
|
||||
case $1 in
|
||||
*.tar.*)
|
||||
[ -f "$1" ] || die "File '$1' does not exist"
|
||||
|
||||
elif pkg_cache "$1" 2>/dev/null; then
|
||||
pkg_name=$1
|
||||
tar_file=$1
|
||||
pkg_name=${1##*/}
|
||||
pkg_name=${pkg_name%@*}
|
||||
;;
|
||||
|
||||
else
|
||||
case $1 in
|
||||
*.tar.*) die "Tarball '$1' does not exist" ;;
|
||||
*) die "Package '$1' has not yet been built"
|
||||
esac
|
||||
fi
|
||||
*)
|
||||
pkg_cache "$1" || die "$1" "Not yet built"
|
||||
pkg_name=$1
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "$tar_dir/$pkg_name"
|
||||
cd "$tar_dir/$pkg_name"
|
||||
|
Loading…
Reference in New Issue
Block a user