diff --git a/README.clinux-dev-scripts b/README.clinux-dev-scripts new file mode 100644 index 0000000..1fbb365 --- /dev/null +++ b/README.clinux-dev-scripts @@ -0,0 +1 @@ +Miscellaneous scripts used for development diff --git a/build-autoconf.sh b/build-autoconf.sh new file mode 100755 index 0000000..e5ed06e --- /dev/null +++ b/build-autoconf.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 17-Sep-2005 +# Last Modified: - +# + +[ $# -eq 1 ] || exit 23 + +PACKAGE=$1; shift +PREFIX=/usr/packages/$PACKAGE + +./configure --prefix=$PREfIX $@ && make diff --git a/build-make+prefix.sh b/build-make+prefix.sh new file mode 100755 index 0000000..51b22f2 --- /dev/null +++ b/build-make+prefix.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 17-Sep-2005 +# Last Modified: - +# + +[ $# -eq 1 ] || exit 23 + +PACKAGE=$1; shift +PREFIX=/usr/packages/$PACKAGE + +make prefix=$PREFIX diff --git a/compile.package b/compile.package new file mode 100644 index 0000000..a292309 --- /dev/null +++ b/compile.package @@ -0,0 +1,14 @@ +#!/bin/sh +# cLinux +# Nico Schottelius (nico-linux@schottelius.org) +# 2005-03-27 +# build a standard package + +[ $# -ne 1 ] && exit 1 + +PRE_PREFIX=/usr/packages +PKGDL=$1 + +PREFIX=${PRE_PREFIX}/${PKGDL} + +./configure "--prefix=${PREFIX}" diff --git a/git-snapshot.sh b/git-snapshot.sh new file mode 100755 index 0000000..c6e54f0 --- /dev/null +++ b/git-snapshot.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Nico Schottelius +# Date: Di Okt 18 00:02:17 CEST 2005 +# Last Changed: - + +GIT_DIR=~/git/cinit +OUTPUT=/home/user/nico/www/org/schottelius/linux/cinit/archives/cinit-snapshot.tar.bz2 + +set -e + +cd "$GIT_DIR" +git-tar-tree $(git-log | head -n1 | awk '{ print $2 }') | bzip2 -9 -c > "$OUTPUT" diff --git a/update-git+cogito.sh b/update-git+cogito.sh new file mode 100755 index 0000000..45727cc --- /dev/null +++ b/update-git+cogito.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# Nico Schottelius +# Date: Mit Nov 9 12:57:04 CET 2005 +# Last Modified: Thu Nov 10 12:53:00 CET 2005 +# +# Install latest git and cogito to $INSTALL_PREFIX/$name and +# link the binaries to $BINDIR +# Needs git and cogito to work! +# And: +# - libexpat-dev +# - libcurl3-dev +# - libssl-dev +# - libz-dev + +BASE_GET=http://www.kernel.org/pub/scm/ +PROJECTS="git/git.git cogito/cogito.git" +BUILDDIR=/home/user/nico/build +INSTALL_PREFIX=/usr/packages +BINDIR=/usr/local/bin + +error_in() +{ + echo "[failed] $1" + echo "Exiting now." + exit 1 +} + +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" || error_in "$BUILDDIR/$realname" + cg-update origin + fi + + if [ $? -ne 0 ]; then + echo "Pull or clone failed, ABORTING." + exit 23 + fi + + cd "$BUILDDIR/$realname" + version=$(cg-object-id) + echo "Installing $realname (Version: $version)" + DDIR=$INSTALL_PREFIX/$realname-$version + make clean || error_in "Cleaning $realname" + make "prefix=$DDIR" all || error_in "Building $realname" + make "prefix=$DDIR" install || error_in "Installing $realname" + + echo "Linking files to $BINDIR ..." + for file in "$DDIR/bin/"*; do + ln -sf $file "$BINDIR" || error_in "Linking $file" + done +done