Browse Source

/ip support

master 1.5.1
Jack L. Frost 7 years ago
parent
commit
e3d642a730
  1. 11
      sup

11
sup

@ -167,6 +167,14 @@ sup.mktemp() {
printf '%s\n' "${tmp_dir}/${tmp_file_name}"
}
sup.get_my_ip() {
my_ip=$( curl -fsL https://zfh.so/ip )
if ! (( $? )); then
printf '%s\n' $my_ip
fi
}
sup.set_argv() {
declare arg opt c
declare -g argv
@ -219,6 +227,8 @@ main() {
flag_scrot_fullscreen='1'
;;
-i|--my-ip) action='getmyip';;
-S|--short) flag_shortlink='1';;
-u|--url) action='url';;
@ -236,6 +246,7 @@ main() {
case "${action:-upload}" in
upload) sup.upload "$1";;
url) sup.url "$1";;
getmyip) sup.get_my_ip;;
esac
}

Loading…
Cancel
Save