This commit is contained in:
Eugene Kalinin 2025-12-26 10:44:16 +00:00 committed by GitHub
commit d7af39aa60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,6 +50,10 @@ function mkcd takedir() {
mkdir -p $@ && cd ${@:$#}
}
function taketmp() {
cd $(mktemp -d)
}
function takeurl() {
local data thedir
data="$(mktemp)"
@ -82,6 +86,8 @@ function take() {
takezip "$1"
elif [[ $1 =~ ^([A-Za-z0-9]\+@|https?|git|ssh|ftps?|rsync).*\.git/?$ ]]; then
takegit "$1"
elif [[ "$1" == "" ]]; then
taketmp
else
takedir "$@"
fi