Skip to content

Commit 8f19bee

Browse files
committed
feat: adicionado clbin como alternativa ao 0x0
1 parent 18af7e5 commit 8f19bee

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
██║ ╚██████╔╝╚██████╔╝██║ ██║███████╗
77
╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
88
```
9-
[![Release](https://img.shields.io/badge/release-2.3.5-brightgreen)](https://github.com/mateuscomh/yoURL/releases)
9+
[![Release](https://img.shields.io/badge/release-2.4.5-brightgreen)](https://github.com/mateuscomh/yoURL/releases)
1010
[![Build Status](https://github.com/mateuscomh/yoURL/actions/workflows/shell-linter.yml/badge.svg)](https://github.com/mateuscomh/yoURL/actions/workflows/shell-linter.yml)
1111

1212
# URL shortner and upload files direct from terminal

yourl.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Deps: qrencode/zbar, curl, xclip, pbcopy (MacOS)
99
#----------------------------------------------------|
1010

11-
version='2.3.5'
11+
version='2.4.5'
1212

1313
logo="
1414
██╗ ██╗ ██████╗ ██╗ ██╗██████╗ ██╗
@@ -45,7 +45,11 @@ esac
4545

4646
if [[ -f "$1" ]]; then
4747
# If $1 is file
48-
read -r <<<"$(curl -sF "file=@$1" https://0x0.st | sed -e "s/<.*//")"
48+
read -r <<<"$(curl -sF "file=@$1" https://0x0.st | sed -e "s/<.*//")" \
49+
|| read -r <<< "$(curl -sF 'clbin=<-' https://clbin.com < "$1" | grep -o 'hxxps://.*' | sed 's/hxxps/https/')"
50+
[[ -z "$REPLY" ]] && \
51+
read -r <<<"$(curl -sF 'clbin=<-' https://clbin.com < "$1" | grep -o 'https://.*')"
52+
4953
else
5054
# If $1 is a url
5155
read -r <<<"$(curl -s http://tinyurl.com/api-create.php?url="$1")"

0 commit comments

Comments
 (0)