minor improvement in fspget, now checking that the uri begins with fsp://

This commit is contained in:
hoaxter 2003-12-11 20:17:49 +00:00
parent 052bae42dc
commit 0f2bbac0f0

View File

@ -55,6 +55,10 @@ alias fcd='set -f;_fcd'
####something like wget emulation#### ####something like wget emulation####
_fspget() { _fspget() {
usage="echo \"Usage: fsp://[host]:[port]/path/to/file\""
case $1 in
fsp://*)
FSP_HOST=$(echo $1|awk -F"/" '{print $3}'|awk -F":" '{print $1}') FSP_HOST=$(echo $1|awk -F"/" '{print $3}'|awk -F":" '{print $1}')
FSP_DIR=$(dirname $(echo $1|sed -e 's/fsp:\/\/.*:[0-9]*\//\//g')) FSP_DIR=$(dirname $(echo $1|sed -e 's/fsp:\/\/.*:[0-9]*\//\//g'))
@ -69,5 +73,9 @@ _fspget() {
fver fver
fget $filename fget $filename
echo "DONE" echo "DONE"
;;
*)
eval $usage
esac
} }
alias fspget='set -f;_fspget' alias fspget='set -f;_fspget'