summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fifa.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/fifa.sh b/src/fifa.sh
index 28fe891..7d3f13e 100755
--- a/src/fifa.sh
+++ b/src/fifa.sh
@@ -41,13 +41,23 @@ 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"
+ profile=/home/arch/fifa/profile-$1
[ -f "$profile" ] && source "$profile" || die_error "Something went wrong while sourcing profile $profile"
}
+load_library ()
+{
+ [ -z "$1" ] && die_error "load_library needs a library argument"
+ echo "Loading library $1 ..."
+ library=/arch/$1
+ source $library*.sh || die_error "Something went wrong while sourcing library $library*.sh"
+}
+
+
execute ()
{
[ -z "$1" -o -z "$2" ] && die_error "Use the execute function like this: execute <type> <name> with type=phase/worker"
@@ -73,6 +83,9 @@ echo "Welcome to $TITLE"
mount -o remount,rw / &>/dev/null
+load_library lib-archboot/setup
+load_library lib-archboot/quickinst
+
[ "$1" != base ] && load_profile base
load_profile $1