summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2019-12-20 17:10:40 +0000
committerLeif Lindholm <leif.lindholm@linaro.org>2019-12-20 18:15:44 +0000
commit62ca0382c46b1a0173a450dee88e9df5765cfe4e (patch)
tree08de84ba437155072ca7c9b60655eafb5ede2023
parent94dc4cf69aa8d7eaa40e5f1b6789c31549a2233c (diff)
delete git-config subdirectory and installation script
edk2 commit 4eb0acb1e2be ("BaseTools: add script to configure local git options"), in combination with dropping use of the TianoCore contribution agreement obviates the need to keep these template files around - so drop them. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
-rw-r--r--git-config/git.template4
-rw-r--r--git-config/sort.order8
-rwxr-xr-xsetup-environment.sh153
3 files changed, 0 insertions, 165 deletions
diff --git a/git-config/git.template b/git-config/git.template
deleted file mode 100644
index 19849fe..0000000
--- a/git-config/git.template
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-Contributed-under: TianoCore Contribution Agreement 1.1
-Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
diff --git a/git-config/sort.order b/git-config/sort.order
deleted file mode 100644
index 7cc162a..0000000
--- a/git-config/sort.order
+++ /dev/null
@@ -1,8 +0,0 @@
-*.dec
-*.dsc.inc
-*.dsc
-*.fdf
-*.inf
-*.h
-*.vfr
-*.c
diff --git a/setup-environment.sh b/setup-environment.sh
deleted file mode 100755
index 08f967e..0000000
--- a/setup-environment.sh
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/bin/bash
-
-CONFIGDIR=~/.tianocore
-SRCDIR=`dirname $0`
-
-FORCE=false
-NUMWARNINGS=0
-
-SCRIPTNAME=`basename $0`
-
-printusage()
-{
- echo "$SCRIPTNAME - initialize and verifyTianoCore development environment"
- echo "Verifies git configuration, installs git hooks, etc."
- echo "To be executed from one of your cloned git directories"
- echo
- echo "usage: $SCRIPTNAME [-f]"
- echo
- echo " -f Force sucessful completion for non-typical situations"
-}
-
-while [ $# -ge 1 ]; do
- case $1 in
- -f)
- FORCE=true
- ;;
- *)
- echo "Unknown parameter '$1' - aborting"
- echo
- printusage
- exit 1
- ;;
- esac
-
- shift
-done
-
-checkrepo()
-{
- if [ ! -d .git ]; then
- echo "$PWD is not a git repository" >&2
- exit 1
- fi
-
- ORIGINPATTERN=".*://github.com/tianocore/.*"
- if [ -z `git remote get-url origin | grep -i "$ORIGINPATTERN"` ]; then
- echo
- echo "origin is not github.com/tianocore/ - is this intentional?"
- if [ $FORCE == "true" ]; then
- return
- fi
- echo "Aborting - Override with -f to force."
- echo
- fi
-}
-
-checkgitconfig()
-{
- checkrepo
-
- GITUSER=`git config user.name`
- GITEMAIL=`git config user.email`
- if [ -z "$GITUSER" -o -z "$GITEMAIL" ]; then
- echo "git user and/or email not configured"
- echo "please run"
- echo " git config --global user.name=<your name as displayed in email clients>"
- echo " git config --global user.email=<your email address>"
- echo "(omit the '--global' if using different name/email for other development)"
- exit 1
- fi
-
- git config sendemail.smtpserver >/dev/null
- if [ $? -ne 0 ]; then
- echo "WARNING: no SMTP server configured, git send-email will not work!"
- NUMWARNINGS=$(($NUMWARNINGS + 1))
- fi
-}
-
-# checkmakedir <directory>
-checkmakedir()
-{
- if [ ! -d "$1" ]; then
- echo "Creating $1"
- mkdir "$1"
- fi
-}
-
-# checkcopyfile <source file> <destination file>
-checkcopyfile()
-{
- if [ -e $2 ]; then
- if cmp -s "$1" "$2"; then
- echo " Not overwriting existing identical file '$2'"
- return
- else
- echo " Updating '$2'"
- fi
- fi
-
- if [ $FORCE == "true" ]; then
- COPYFLAGS=
- else
- COPYFLAGS=-i
- fi
- cp -p $COPYFLAGS "$1" "$2"
-}
-
-copyfiles()
-{
- echo "Installing GIT hooks:"
- for file in $SRCDIR/git-hooks/*; do
- checkcopyfile $file .git/hooks/`basename $file`
- done
- echo "done."
-
- echo
-
- checkmakedir "$CONFIGDIR"
- echo "Installing TianoCore templates and configuration:"
- for file in $SRCDIR/git-config/*; do
- checkcopyfile $file $CONFIGDIR/`basename $file`
- done
- echo "done."
-}
-
-configuregit()
-{
- GITTEMPLATE=`git config commit.template`
- if [ -z $GITTEMPLATE ]; then
- git config --add commit.template $CONFIGDIR/git.template
- elif [ $GITTEMPLATE != $CONFIGDIR/git.template ]; then
- echo "WARNING: commit.template already configured in other location than '$GITTEMPLATE'"
- NUMWARNINGS=$(($NUMWARNINGS + 1))
- fi
-
- ORDERFILE=`git config diff.orderfile`
- if [ -z $ORDERFILE ]; then
- git config --add diff.orderfile $CONFIGDIR/sort.order
- elif [ $ORDERFILE != $CONFIGDIR/sort.order ]; then
- echo "WARNING: diff.orderfile already configured in other location than '$ORDERFILE'"
- NUMWARNINGS=$(($NUMWARNINGS + 1))
- fi
-}
-
-checkgitconfig
-copyfiles
-configuregit
-
-echo
-echo "Successfully installed/updated configuration!"
-if [ $NUMWARNINGS -gt 0 ]; then
- echo "(with $NUMWARNINGS warnings)"
-fi