Added patched version of git configs
authorroot <root@xenhost00.office.fsf.org>
Mon, 18 Aug 2014 13:44:04 +0000 (09:44 -0400)
committerroot <root@xenhost00.office.fsf.org>
Mon, 18 Aug 2014 13:44:04 +0000 (09:44 -0400)
files/usr/lib/fai/get-config-dir-git/DEFAULT [new file with mode: 0755]
package_config/WORKSTATION
scripts/FAIBASE/50-patch-get-configs-git [new file with mode: 0644]

diff --git a/files/usr/lib/fai/get-config-dir-git/DEFAULT b/files/usr/lib/fai/get-config-dir-git/DEFAULT
new file mode 100755 (executable)
index 0000000..0e6fc61
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# (c) 2002-2006 Henning Glawe <glaweh@debian.org>
+# (c) 2007 Holger Levsen <holger@layer-acht.org> for the modifications to use git
+
+### BEGIN SUBROUTINE INFO
+# Provides-Var:
+# Requires-Var:    $FAI_CONFIG_SRC $FAI $LOGDIR
+# Suggests-Var:
+# Short-Description: get $FAI from a git repository.
+### END SUBROUTINE INFO
+
+# matched string: "git://gitpath"
+protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
+gitpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^[:space:]]\+\)')
+
+case $protocol in
+       git)
+               giturl="git://$gitpath"
+               ;;
+       git+http)
+               echo git+http
+               giturl="http://$gitpath"
+               ;;
+       git+ssh)
+               echo git+ssh
+               giturl=$gitpath
+               ;;
+       *)
+               echo "get-config-dir-git: protocol $protocol not implemented"
+               exit 1
+               ;;
+esac
+               
+if [ -d "$FAI/.git" ] ; then
+   echo "Updating git copy in $FAI"
+   cd $FAI
+   git pull
+   task_error 701 $?
+else 
+   echo "Checking out from git"
+   # cloning into an existing directory is not allowed
+   if [ -d $FAI ]; then rmdir $FAI; fi
+   git clone $giturl $FAI 
+   task_error 702 $?
+fi
index ff821e7236797c29c1868742ffc1d562052b9da0..7db6617f5e01033dd710b44a8de8db39fd2c80d7 100644 (file)
@@ -1,4 +1,5 @@
 PACKAGES aptitude WORKSTATION
+abrowser
 libreoffice
 thunderbird
 enigmail
diff --git a/scripts/FAIBASE/50-patch-get-configs-git b/scripts/FAIBASE/50-patch-get-configs-git
new file mode 100644 (file)
index 0000000..0170b2e
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+fcopy -v /usr/lib/fai/get-config-dir-git
\ No newline at end of file