From 50f8bb0c4dd45f727974f9e81666c59bb8148939 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 31 Oct 2008 09:59:20 +0100 Subject: http support for downloading a profile --- src/fifa.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fifa.sh b/src/fifa.sh index 7d3f13e..ceaac75 100755 --- a/src/fifa.sh +++ b/src/fifa.sh @@ -42,9 +42,14 @@ die_error () load_profile() { [ -z "$1" ] && die_error "load_profile needs a profile argument" - #TODO: http support echo "Loading profile $1 ..." - profile=/home/arch/fifa/profile-$1 + if [[ $1 =~ ^http:// ]] + then + profile=/home/arch/fifa/profile-downloaded-`basename $1` + wget $1 -q -O $profile >/dev/null || die_error "Could not download profile $1" + else + profile=/home/arch/fifa/profile-$1 + fi [ -f "$profile" ] && source "$profile" || die_error "Something went wrong while sourcing profile $profile" } -- cgit v1.2.3-54-g00ecf