From 610b3fe35b555fc26b410e6c9639bb6b8bdc5909 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Nov 2005 13:00:18 +0100 Subject: [PATCH] Initial commit --- README | 1 + update-git+cogito.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 README create mode 100755 update-git+cogito.sh diff --git a/README b/README new file mode 100644 index 0000000..1fbb365 --- /dev/null +++ b/README @@ -0,0 +1 @@ +Miscellaneous scripts used for development diff --git a/update-git+cogito.sh b/update-git+cogito.sh new file mode 100755 index 0000000..318b06d --- /dev/null +++ b/update-git+cogito.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# Nico Schottelius +# Date: Mit Nov 9 12:57:04 CET 2005 +# Last Modified: - +# +# Install latest git and cogito to $INSTALL_PREFIX/$name and +# link the binaries to $BINDIR +# Needs git and cogito to work! + +BASE_GET=http://www.kernel.org/pub/scm/ +PROJECTS="git/git.git cogito/cogito.git" +BUILDDIR=/home/nico/build +INSTALL_PREFIX=/usr/packages +BINDIR=/usr/local/bin + +for project in $PROJECTS; do + realname=$(echo $project | sed -e 's,.*/,,' -e 's/\.git$//') + + echo "Working on $realname (in $BUILDDIR/$realname) ... " + + if [ ! -d "$BUILDDIR/$realname" ]; then + echo "Cloning $realname" + cg-clone "${BASE_GET}${project}" "$BUILDDIR/$realname" + else + echo "Updating $realname from \"origin\"" + cd "$BUILDDIR/$realname" || exit 1 + cg-update origin + fi + + cd "$BUILDDIR/$realname" + version=$(cg-object-id) + echo "Installing $realname (Version: $version)" + DDIR=$INSTALL_PREFIX/$realname-$version + make "prefix=$DDIR" all + make "prefix=$DDIR" install + + echo "Linking files to $BINDIR ..." + for file in "$DDIR/bin/"*; do + ln -sf $file "$BINDIR" + done +done