Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fvbe.git;a=commitdiff;h=2c045c90d3ddc034fe6a9acf8fa0eeeb920d7e5a

commit 2c045c90d3ddc034fe6a9acf8fa0eeeb920d7e5a
Author: James Buren <r...@frugalware.org>
Date:   Tue Apr 2 01:43:51 2013 -0500

import configuration script

diff --git a/configure b/configure
new file mode 100755
index 0000000..0e7a283
--- /dev/null
+++ b/configure
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+set -e
+
+error()
+{
+  echo "$1"
+  exit 1
+}
+
+while test -n "$1"; do
+  case $1 in
+
+    --arch)
+      ARCH="$2"
+      shift
+      ;;
+
+    --release)
+      RELEASE="$2"
+      shift
+      ;;
+
+    --type)
+      TYPE="$2"
+      shift
+      ;;
+
+    --branch)
+      BRANCH="$2"
+      shift
+      ;;
+
+    --ui)
+      UI="$2"
+      shift
+      ;;
+
+    *)
+      error "Unrecognized argument: $1"
+      ;;
+
+  esac
+
+  shift
+done
+
+if test -z "$ARCH"; then
+  error "ARCH is not defined."
+fi
+
+if test -z "$RELEASE"; then
+  error "RELEASE is not defined."
+fi
+
+if test -z "$BRANCH"; then
+  error "BRANCH is not defined."
+fi
+
+if test -z "$TYPE"; then
+  error "TYPE is not defined."
+fi
+
+if test -z "$UI"; then
+  error "UI is not defined."
+fi
+
+if test "$TYPE" = "basic"; then
+  PACKAGES="base"
+elif test "$TYPE" = "full"; then
+  PACKAGES="apps base devel gnome kde lib locale-extra multimedia network x11 
xapps xfce4 xlib xmultimedia"
+elif test "$TYPE" = "net"; then
+  PACKAGES=""
+fi
+
+rm -f fvbe.conf
+cp -f fvbe-skel.conf fvbe.conf
+
+sed -i "s|^FVBE_ARCH=.*\$|FVBE_ARCH=\"$ARCH\"|"                             
fvbe.conf
+sed -i "s|^FVBE_ISO_RELEASE=.*\$|FVBE_ISO_RELEASE=\"$RELEASE\"|"            
fvbe.conf
+sed -i "s|^FVBE_ISO_TYPE=.*\$|FVBE_ISO_TYPE=\"$TYPE\"|"                     
fvbe.conf
+sed -i "s|^FVBE_ROOTFS_REPOSITORY=.*\$|FVBE_ROOTFS_REPOSITORY=\"$BRANCH\"|" 
fvbe.conf
+sed -i "s|^FVBE_SETUP_UI=.*\$|FVBE_SETUP_UI=\"$UI\"|"                       
fvbe.conf
+sed -i "s|^FVBE_ISO_PACKAGES=.*\$|FVBE_ISO_PACKAGES=\"$PACKAGES\"|"         
fvbe.conf
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to