Commit a3255c45 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: fix get_filename

parent f3ca2658
......@@ -913,6 +913,12 @@ sget()
local CID="$(get_cid_by_url "$URL")"
if [ -n "$CID" ] ; then
if [ -n "$GETFILENAME" ] ; then
get_filename_by_cid "$CID"
exit
fi
if [ -z "$TARGET" ] ; then
TARGET="$(get_filename_by_cid "$CID")"
if [ -z "$TARGET" ] ; then
......@@ -976,6 +982,11 @@ scat()
sget()
{
if [ -n "$GETFILENAME" ] ; then
get_filename "$1"
exit
fi
url_sget "$@"
}
......@@ -1068,11 +1079,6 @@ if [ -n "$CHECKURL" ] ; then
exit
fi
if [ -n "$GETFILENAME" ] ; then
get_filename "$1"
exit
fi
# separate part for github downloads
if echo "$1" | grep -q "^https://github.com/" && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment